[JAVA2D] Graphics2D.dispose every paint?

2000-01-12 Thread Nick Collier
I'm wondering what the disadvantages of not disposing of the graphics context every paint. More specifically, on the first call to paint I create a bufferedImage and create a graphics2D from it. I use this graphics2D for drawing and then use the graphics passed into paint to draw the

Re: [JAVA2D] Graphics2D.dispose every paint?

2000-01-12 Thread Jim Graham
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