开发者

Is it possible to know at runtime when Garbage collection is occuring?

Basically, I am using achartengine for a charting application. It seems like i have a memory leak somewhere so garbage collection is occuring somewhat often. The problem is, whenever GC occurs, it messes up my chart. I can call repaint() to fix it, but I would need to know when GC.

Image of the messed up char开发者_高级运维t below

[URL=http://img166.imagevenue.com/img.php?image=403999439_device_2011_07_11_122608_122_441lo.png][IMG]http://img166.imagevenue.com/loc441/th_403999439_device_2011_07_11_122608_122_441lo.png[/IMG][/URL]


Each Java Object have a method finalize() which is called just before the GC try to "delete" the object. example

Hope this help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜