Re: Leaking images
Re: Leaking images
- Subject: Re: Leaking images
- From: John Timmer <email@hidden>
- Date: Fri, 21 Feb 2003 08:07:28 -0500
>
Am Freitag, 21.02.03 um 05:07 Uhr schrieb John Timmer:
>
>
> weatherImage = [[[NSImage alloc] initWithSize:[tempImage size]]
>
> retain];
>
>
Why the retain?
Because otherwise the image gets released somewhere else, and to program
tanks when it hits the release (but only the second time it hits this bit of
code, for some reason). No, it doesn't make sense to me either. Although
weatherImage is a class variable, I've made sure that the only other place
it's used is a composite operation - nothing alters the retain count aside
from the stretch I pasted into the last email.
John
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.