Fixing my massive memory leak with NSImage/CALayer

2008-04-01 Thread Nathan Vander Wilt
I want to pop up photographs inside their own Core Animation layers, but I get huge real memory usage that never goes down. I have an FRPhoto class whose instances manage other metadata for the image, and also have a convenience method to get an NSImage* as follows: - (NSImage*)image {

Re: Fixing my massive memory leak with NSImage/CALayer

2008-04-01 Thread Jens Alfke
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

Re: Fixing my massive memory leak with NSImage/CALayer

2008-04-01 Thread Jens Alfke
On 1 Apr '08, at 7:47 PM, Nathan Vander Wilt wrote: Looks like I'll have to design a smarter architecture to keep the right images in memory at the right time. IKImageBrowserView (new in 10.5) pretty much does this for you. If its look and feel are compatible with what you're doing (it's