On Jan 14, 2009, at 9:13 PM, Joe Ranieri wrote:

NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:font, NSFontAttributeName, self.textColor, NSForegroundColorAttributeName, nil]; NSAttributedString* aStr = [[[NSAttributedString alloc] initWithString:str attributes:dict] autorelease];
                
                NSImage* image = [[NSImage alloc] initWithSize:imgSize];

You're leaking this NSImage.

sigh.  I knew I should have explained this more.

I know, in the code snippet I sent, that the NSImage is being leaked. But it's tickling the bug (where in the app, I have 100s of NSImages, and I need to keep them around). Why, on a machine with 32GB of RAM, and 1.5GB of VRAM, would having 350 1920x1080 NSImages live in the app be a problem? Make my app page, sure, but kill the window server so bad that it needs to get restarted?

Not acceptable.




--> Michael B. Johnson, PhD
--> http://homepage.mac.com/drwave (personal)
--> http://xenia.media.mit.edu/~wave (alum)
--> MPG Lead
--> Pixar Animation Studios




_______________________________________________

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 arch...@mail-archive.com

Reply via email to