cardslib
cardslib copied to clipboard
CardThumbnailView memory leak
Here's the leak trace:
* GC ROOT static it.gmariotti.cardslib.library.utils.CacheUtil.sInstance
* references it.gmariotti.cardslib.library.utils.CacheUtil.mMemoryCache
* references it.gmariotti.cardslib.library.view.component.CardThumbnailView$1.this$0
(anonymous class extends android.util.LruCache)
* references it.gmariotti.cardslib.library.view.component.CardThumbnailView.mContext
* leaks ...activities.NowActivity instance
It seems like this is caused by the anonymous, inner class being non-static.
I can confirm this bug. Can also provide logs or more informations if needed.
Can also confirm. Using CacheUtil.putMemoryCache(null); after removing card views from layout can be used a temp fix for the leak. (If you were to do this in onDestroy, it has to be before calling super.onDestroy();)