I am working in an android application an I am having some memory issues.I have a lot of private and public static variables declared in an activity.
I want to know whether when an activity id finished, these private and public object cleared(Memory) or should we make it null
manually by assigning it to null in on onDestroy()
. Is this correct method or please advice an alternative. Also I call the garbage collector manually in every onDestroy()
. Is it correct way to call the System.gc manually?
Please help me.