Graphics instance

I grab a Graphics object from a frame at the start and use it. Is it safe to store this and use it whenever I want? If the VM moves objects around it does ensure my reference is always good?

Just trying to make sure before I do something stupid. It appears to work this way from my testing.

[304 byte] By [fuchssaa] at [2007-9-28 8:22:57]
# 1

I've had weird happenings as a result of holding Graphics instances. Actually the worst culprit is graphics resulting from a getGraphics() call on an Image object. Hopefully you'll get something more definite, but from my experience I advise you to be very cautious, and if you have unexpected behavior anywhere within your rendering progress, check your Graphics object before you pull out too much hair :D

markuskidda at 2007-7-9 19:35:49 > top of Java-index,Other Topics,Java Game Development...