[3077] in java-interest

home help back first fref pref prev next nref lref last post

dispose() on GC's [was Re: Finalize() ]

daemon@ATHENA.MIT.EDU (Andruid Kerne)
Sun Oct 29 23:40:35 1995

Date: Sun, 29 Oct 95 22:10:23 EST
From: andruid@SLINKY.CS.NYU.EDU (Andruid Kerne)
To: java-interest@java.sun.com, flar@bendenweyr.eng.sun.com
In-Reply-To: <199510292108.NAA08574@java.sun.com> (owner-java-interest-digest@java.sun.com)

>>>
This is why when we call your paint and update methods with a Graphics
object we explicitly call the dispose() method on the object after you
are done painting even though dispose() is also called from the
finalization method.  If we relied on the garbage collector to dispose
the GC's then we might have an indeterminate number of system GC
objects being wasted attached to old unreachable (but not yet
collected/finalized) Graphics objects...
>>>
i have been wondering: if i call paint myself, by doing getGraphics()
on something derived form Component, should a do a dispose() or
finalize() on that GC when paint returns?  My interpretation of your
comments is that that might be a good thing to do.
-- 
Cheers,

Andruid Kerne
NYU Media Research Laboratory
	--and also--
   Creative Media Cauldron

http://c4dm.nyu.edu/andruid/

The distinctions between artists and engineers -- between content
developers and programmers -- are entirely artificial.  
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post