forked from recloudstream/cloudstream
		
	mem leak fix
This commit is contained in:
		
							parent
							
								
									2a459a0fdd
								
							
						
					
					
						commit
						1628ec56c2
					
				
					 3 changed files with 8 additions and 1 deletions
				
			
		|  | @ -149,4 +149,7 @@ dependencies { | ||||||
| 
 | 
 | ||||||
|     // Util to skip the URI file fuckery 🙏 |     // Util to skip the URI file fuckery 🙏 | ||||||
|     implementation "com.github.tachiyomiorg:unifile:17bec43" |     implementation "com.github.tachiyomiorg:unifile:17bec43" | ||||||
|  | 
 | ||||||
|  |     // debugImplementation because LeakCanary should only run in debug builds. | ||||||
|  |     debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.7' | ||||||
| } | } | ||||||
|  | @ -57,7 +57,10 @@ class DownloadFragment : Fragment() { | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     override fun onDestroy() { |     override fun onDestroy() { | ||||||
|         downloadDeleteEventListener?.let { VideoDownloadManager.downloadDeleteEvent -= it } |         if(downloadDeleteEventListener != null) { | ||||||
|  |             VideoDownloadManager.downloadDeleteEvent -= downloadDeleteEventListener!! | ||||||
|  |             downloadDeleteEventListener = null | ||||||
|  |         } | ||||||
|         super.onDestroy() |         super.onDestroy() | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1719,6 +1719,7 @@ class PlayerFragment : Fragment() { | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     override fun onDestroy() { |     override fun onDestroy() { | ||||||
|  |         MainActivity.playerEventListener = null | ||||||
|         /*  val lp = activity?.window?.attributes |         /*  val lp = activity?.window?.attributes | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue