Re: Re: Need help tracking down memory issue
Re: Re: Need help tracking down memory issue
- Subject: Re: Re: Need help tracking down memory issue
- From: <email@hidden>
- Date: Thu, 10 Mar 2005 12:07:16 +0000
Thanks, Christian. Someone else actually pointed this out to me off list. I've been having problems with my mail service for some reason and haven't been able to post that this was solved. But I do thank you. What I was advised to do was simply tag on an autorelease when I alloc/init the variable, and ditch the release statement. Works fine now. Thanks.
James
>
> From: Christian Schneider <email@hidden>
> Date: 2005/03/10 Thu AM 11:27:03 GMT
> To: "email@hidden" <email@hidden>
> CC: email@hidden
> Subject: Re: Need help tracking down memory issue
>
> James,
>
> > NSString* fingerprint = [[NSString alloc] initWithString:[fileToConvert lastPathComponent]];
> > fingerprint = [[fingerprint stringByAppendingString:@":"] stringByAppendingString:output];
>
> > [fingerprint release];
>
> you are calling release on the object returned by [[fingerprint
> stringByAppendingString:@":"] stringByAppendingString:output] which
> probably will have been autoreleased, thus the crash. Use an
> NSMutableString instead.
>
> chris
>
_______________________________________________
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