On Apr 1, 2008, at 4:24 PM, Jens Alfke wrote:
On 1 Apr '08, at 11:07 AM, Nathan Vander Wilt wrote:

The NSImage that my FRPhoto holds on to should have "invalidate[d] and free[d] the offscreen caches of all image representations".

That doesn't mean the image representations themselves are flushed, though. They're still there, typically holding onto big uncompressed pixmaps. All -recache does is flush extra copies of those pixmaps that were copied into VRAM to speed up blitting.

If you want the pixmaps out of memory, you have to dealloc the NSImages themselves.

Okay, I was confusing "representations" with "caches" -- using lazy initialization for the representations is equivalent to allocating the representations eventually. A more careful reading of http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Images/chapter_7_section_2.html explains "-recache" in the correct context. Looks like I'll have to design a smarter architecture to keep the right images in memory at the right time.

It was really frustrating to see my app balloon up like that without understanding what was going on. Thanks much for your help!

-natevw

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to