Memory Leakage Issue

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
halomanish
Posts: 2
Joined: Mon Feb 06, 2017 6:03 am
antibot: No, of course not.

Memory Leakage Issue

Post by halomanish » Mon Feb 06, 2017 6:30 am

Sir

As a part of my PhD work on software testing, I tested JFreeChart using Aspect Oriented approach and found a memory leak in the ChartPanel class. Objects of Graphics2D have been created within this class for which it is necessary to call the dispose method which abandons this graphics context and releases the system resources used by it.

We observed that although a total of 5 objects of Graphics2D class have been created in this class for which the dispose method should be called, it has been called only 4 times. For one of the Graphics2D objects, namely bufferG2, created within the paintComponent method of the ChartPanel class, the dispose function has not been called which may become a reason for memory leak.

Details of our testing approach can be seen at http://ieeexplore.ieee.org/document/7456923/

Thanks and Regards
Manish Jain
PhD Scholar

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: Memory Leakage Issue

Post by david.gilbert » Mon Feb 06, 2017 10:31 pm

Thanks for the report Manish. I fixed it, details you can see via your bug report at GitHub:

https://github.com/jfree/jfreechart/issues/38
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked