Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BufferedImages not garbage collected -- any suggestions?




On Mar 28, 2006, at 5:56 PM, Greg Guerin wrote:


I detect the scent of wild goose in the air. I'm not at all convinced that
flush() will discard the underlying Raster or its DataBuffer or any of
their internal arrays.

This looks to be a pretty good olfactory sense. I expanded my memory test to pixelate the images and then even the 48 byte frees disappeared for flush().


flush freed = -368
flush freed = 0
flush freed = 0
flush freed = 0

The first assumed unrelated normal gc activity again.
The snippet a bit larger. At...
http://users.spacestar.net/mikehall/BufferedImageGCTester.java

if anyones interested. It is roughly what I use in some Lee Ann Rucker derived JColumnView code to provide the icon in the files preview panel. This weekend I used the Quaqua JFileChooser instead of my code which is a very nice implementation but seems absent the icon in the preview?

Anyhow, getting off-topic. flush() for real images doesn't in fact seem to do anything. Unsure if that remains a documentation bug or false advertising, or whatever. But odd in view first of the 48 bytes I was able to free with empty images even and odd per the original poster stating this was freeing substantial memory for him.

Mike Hall        mikehall at spacestar dot net
http://www.spacestar.net/users/mikehall
http://sourceforge.net/projects/macnative



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: BufferedImages not garbage collected -- any suggestions? (From: Greg Guerin <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.