| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Michael Ellis wrote:
This memory leak search began when I was qualifying code that scrolls through thousands of BufferedImages. Of course, only a small fraction of these images are displayed at any given time, so the code has occasion to create new BufferedImages for the ones being displayed and to dispose of the unused, out-of-view instances. I think that it is worth mentioning that each BufferedImage is owned by a Component that is responsible for painting the image.
[snip]
What made the difference was having the Component class' "finalize()" method explicitly call "flush()" on its BufferedImage before nulling it out. Once this was done, the verbose output from the GC confirmed that the BufferedImage's memory was being reclaimed and the OutOfMemoryException stopped.
Rob _______________________________________________ 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
| References: | |
| >Re: BufferedImages not garbage collected -- any suggestions? (From: Michael Ellis <email@hidden>) | |
| >Re: BufferedImages not garbage collected -- any suggestions? (From: Michael Hall <email@hidden>) | |
| >Re: BufferedImages not garbage collected -- any suggestions? (From: Michael Ellis <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.