Re: Why does this leak memory?
Re: Why does this leak memory?
- Subject: Re: Why does this leak memory?
- From: Matt Ball <email@hidden>
- Date: Mon, 11 Jul 2005 02:28:04 -0400
I think I may be on to something...
I changed:
- (NSImage *)image
{
return [[image retain] autorelease];
}
to
- (NSImage *)image
{
return [image retain];
}
and it seems to be working better. I now have only 6 leaks as opposed
to > 150. I don't know if this helps the situation at all, but I
thought I'd let you know. Let me know if this triggers a Eureka moment
:)
- Matt Ball
On 7/11/05, Charilaos Skiadas <email@hidden> wrote:
>
>
> On Jul 11, 2005, at 12:48 AM, Matt Ball wrote:
>
> Oh, and in addition: If I change it so that it resizes the image and
> then returns resizedImage, it works fine. I think the weird error is
> because the unresized-image is larger than the table row, so it messes
> things up. However, when I return [resizedImage autorelease]; instead
> of return resizedImage;, I get the same crash we were dealing with
> before...
>
> and still the same problem if you just return it, but add a release at the
> end of the tableView call instead?
> If it is not a pool overflow problem, then I really don't see what's wrong,
> sorry.
>
> - Matt Ball
>
> Haris
>
>
>
_______________________________________________
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