Reputation: 37
After taking a heap dump analysed in the MAT tool. Leak suspects says : One instance of "java.util.TaskQueue" loaded by "" occupies 680,207,896 (82.39%) bytes. The instance is referenced by org.apache.tomcat.util.threads.TaskThread @ 0xc1b52018 ajp-bio-8009-exec-243 ,loaded by "java.net.URLClassLoader @ 0xce67a9b8". The memory is accumulated in one instance of "java.util.TimerTask[]" loaded by "".
But my question is why this is not garbage collected and its accumulating too much of memory.
Upvotes: 1
Views: 1340
Reputation: 179
Check this answer or this answer, maybe it will help you.
I recommend not to keep teference to an Activity or Context inside it. I hope it helps.
Upvotes: 1