try
System.gc ();
incates to the System that now would be a good time for gc. Does not guarantee anything though.
Question
How to clear the ram on button click?
Solution
try
System.gc ();
incates to the System that now would be a good time for gc. Does not guarantee anything though.