Re: String memory leak
Re: String memory leak
- Subject: Re: String memory leak
- From: Paul Forgey <email@hidden>
- Date: Sun, 2 Apr 2006 17:26:02 -0700
I'm not certain why the accessor is retaining it and then adding that
count to the autorelease pool. If the caller wants an instance of
the glass string beyond the lifetime of the class instance owning it
or it being changed, it should retain it itself. So why not:
- (NSString *)glass
{
return glass;
}
But check you have something like:
- (void)dealloc
{
[glass release];
[super dealloc];
}
On Apr 2, 2006, at 6:10 PM, Bruce Truax wrote:
- (NSString *)glass {
return [[glass retain] autorelease];
}
_______________________________________________
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