Closed mokhtarabadi closed 3 years ago
ImageView drawable does not need to be cleaned up specially, but asynchronous tasks(like Picasso or Glide) may be needed because they does not know the Scene lifecycle
I just said imageView for example, because I use ScenePagerAdapter and when I release resources for imageView in child pages , I see the ram usage decreased when scene closed But if I don't do, ram usage will not decrease when parent Scene closed (mean the scene contains the view pager)
garbage collection is not so fast, you can try "force garbage collection" button to force gc https://developer.android.com/studio/profile/memory-profiler
Thanks, I forgotten java garbage collector...
is I need to release resources for my views in every scene after onDestoryView called for example If I have an imageView, called setImageDrawable to null or if I using Picasso, call cancel method for Picasso? did I need something like this?