javaopenglprocessingpgraphics

Processing 2.0b8 / Disposing PGraphics objects and memory management


I'm working on a sketch that uses some PGraphics object as buffers that I draw on the screen with the image() method.

My problem is that I've noticed a huge memory leak, 99% due to this buffers not being destroyed properly.

Is there any way to get rid of this objects to free some memory up? I looked on the docs of the old GLGS library and I've tried with the dispose() method, but it doesn't look to have any effect.


Solution

  • So, after posting in Processing Forum, and thanks to @v.k. answer, I discovered that my problem it's not created by the wrong disposal of PGraphics object.

    There was a memory leak about it, but it was fixed in release 2.0b6.

    So, if you have a memory leak and you think it's a PGraphics bug, update to 2.0b8 or look better at your code.