Re: Why does this leak memory?
Re: Why does this leak memory?
- Subject: Re: Why does this leak memory?
- From: Tito Ciuro <email@hidden>
- Date: Sun, 10 Jul 2005 19:56:58 -0400
Hi Matt,
If you alloc/init 'resizedImage' and don't retain/release/autorelease
'resizedImage' anywhere in the code, then returning [resizedImage
autorelease] should be fine. Check the code.
-- Tito
On 10/07/2005, at 19:51, Matt Ball wrote:
Tony - I still get leaks from that code.
Tito - When I do that, my app crashes.
Also, there is a lot more code in the function that performs other
operations. I have currently commented all the rest out so that I can
focus on one set of leaks at a time. However, I will eventually add
them back in, so I can't just return resizedImage.
- Matt Ball
On 7/10/05, Tony Cate <email@hidden> wrote:
On Jul 10, 2005, at 6:34 PM, Matt Ball wrote:
[resizedImage unlockFocus];
image = [resizedImage retain];
[resizedImage release];
What happens if you rewrite this to:
image = resizedImage;
[image retain];
[resizedImage release];
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden