This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Can boehm-gc be made to finalize more promptly?
> Oscar Pearce wrote:
> Upon reading Sun's Javadoc for java.awt.Graphics, it looks like the
> right thing to do would be for java.awt.Component.processPaintEvent to
> call gfx.dispose() after it's done with the Graphics object...
> I've attached the trivial patch for java.awt.Component. It might even
> compile.
Thanks. I looked at the javadoc you referenced, which includes "it is
preferable to manually free the associated resources by calling this method
rather than to rely on a finalization process which may not run to
completion for a long period of time". Makes it pretty clear that explicit
freeing is an appropriate cure.
I'll put together a patch including yours (unless you submit that first) and
some "trickle down" disposal of xlib things created by Graphics, and submit
it once it works.