0

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 chart 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]

user703039
  • 55
  • 6
  • Redrawing your chart is stop-gap measure. I would strongly urge you to try to find and fix the memory leak instead. You can find some helpful hints [here](http://stackoverflow.com/questions/1147172/what-android-tools-and-methods-work-best-to-find-memory-resource-leaks) – Wesley Wiser Jul 11 '11 at 17:36
  • Thank you. I am doing that. But also wanted to know for personal knowledge – user703039 Jul 11 '11 at 17:45

1 Answers1

0

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

Hope this help.

Ungureanu Liviu
  • 4,034
  • 4
  • 37
  • 42