How to free up Android resources

How can I free the memory of Android resources like TextView , ImageView , etc. inside the onDestroy() method because they consume memory and tell me how to free memory.

+4
source share
1 answer

The garbage collector will release you resources.

Just make sure you don’t hold links that are no longer required.

You can try setting null references in the onDestroy () callback method.

Alternatively, you can use the Memory Analyzer Tool for further study.

+1
source

Source: https://habr.com/ru/post/1486604/


All Articles