Reputation: 43
How can I deallocate the memory of android resources like TextView
, ImageView
etc inside the onDestroy()
method because they are consuming memory and tell me how to release memory.
Upvotes: 4
Views: 510
Reputation: 4787
Garbage Collector will release resources for you.
Just make sure you are not holding references that are no more required.
You can try setting your references to null in onDestroy() call back method.
Also, you can use Memory Analyzer Tool to investigate further.
Upvotes: 1