Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Merory Leak ; Objects have no GC root

I'm trying to solve memory leaks in my application. Using the Eclipse Memory Analyzer. My application crashes after a while due to OOM error.

The biggest suspects seem to be 9 ViewFlippers i use. when looking at them in the analyzer the inspector says it has no GC root.

Does this mean it won't get cleaned up by the Garbage Collector ? if so, how would I go about solving this ... Manually clear them ? Or better , how would i include it in GC root ?

Im pretty new at memory analyzing, so could use some tips.

like image 298
ron Avatar asked Oct 19 '11 08:10

ron


1 Answers

Actually it is the opposite, "No GC root found", means that object is not referenced anymore so garbage collector will clean it up next time it runs.

Check this great video, it explains how to find memory leaks:

http://www.youtube.com/watch?v=_CruQY55HOk

like image 143
Caner Avatar answered Oct 19 '22 20:10

Caner