If you don't call the dispose method on a Graphics object when you are
done with it, then that object may hold onto system resources until it
is garbage collected and finalized.  Note that the VM makes very loose
promises on how often or soon objects will be GC'd and any dangling
references to the objects that you have will prevent them from being
GC'd.

If someone gave you a Graphics object, it should be up to them to dispose
it (i.e. the Graphics handed in to your paint() and update() methods is
disposed by the event loop).  If you create a Graphics object, you should
dispose it when its life is over and you are dropping the reference to it,
otherwise it may wait until a GC cycle to release some resources.

                                ...jim

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to