Hi Nick, In general it's best to avoid recreating BufferedImages in an animation loop, but it sounds like you only do it when necessary, which is okay. I'm interested to see why you need to make a larger BufferedImage when you "zoom in". If you send me a small testcase that reproduces the problem I'd be happy to take a look at it.
Thanks, Chris Nick Collier wrote: > Hi, > > I think I'm seeing a problem with creating BufferedImage-s and memory > use. To over simplify a bit I'm using one to draw on as part of some > animation. Sometimes I need to recreate it when I've zoomed in (the > BufferedImage needs to become bigger). If I do this enough I eventually > I get an OutOfMemoryError when I try to create the new BufferedImage. > The amount of allocated memory should easily be enough to hold the > largest BufferedImage I need so the problem is not with the size of a > single BufferedImage. I don't have any extraneous references to this > BufferedImage and so the memory should be reclaimed I think. It doesn't > appear to be though. I've come up with a work around that eliminates the > need to recreate the BufferedImage, but I'm still puzzled as to why this > should ever occur, especially as it occurs much more frequently on Win2K > than on Linux. > > I've tried looking in the bug database but it seems to be down. > > Any comments appreciated, > > Nick > > -- > Nick Collier > Social Science Research Computing > University of Chicago > http://repast.sourceforge.net > > =========================================================================== > 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". -- Chris Campbell 408-276-6429 [EMAIL PROTECTED] x16429 Sun Microsystems, Java 2D USCA22-212 =========================================================================== 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".
