Re: Instruments leaks.
Re: Instruments leaks.
- Subject: Re: Instruments leaks.
- From: Sandro Noel <email@hidden>
- Date: Sun, 12 Oct 2008 00:31:44 -0400
for instance, the leek tells me that i have a leek here in this
functions.
it is a NSString categorie.
- (NSString *) trimWhiteSpace {
NSMutableString *s = [[self mutableCopy] autorelease];
CFStringTrimWhitespace ((CFMutableStringRef) s);
return (NSString *) [[s copy] autorelease];
} /*trimWhiteSpace*/
and the way the function is being used is like this.
description = [description trimWhiteSpace];
i'm still looking into understanding, so it's kind of hard for me to
be more precise, i'm sorry...
Sandro
On 12-Oct-08, at 12:20 AM, j o a r wrote:
On Oct 11, 2008, at 8:45 PM, Sandro Noel wrote:
most of the leeks are created by NSString's from functions i
gathered off the net.
assignations like
var1 = [var1 message];
This created a leek because the string being replaced is never
released.
or am I wrong.
You need to provide a bit more information:
Is "var1" an instance variable or local variable? How was the
original value of var1 assigned? Is the object returned from "-
message" autoreleased? Can you provide more code from the actual
implementation?
j o a r
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden