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.
source share