Re: NSString componentsSeparatedByString returned memory
Re: NSString componentsSeparatedByString returned memory
- Subject: Re: NSString componentsSeparatedByString returned memory
- From: Martin Linklater <email@hidden>
- Date: Fri, 14 Dec 2007 21:55:44 +0000
Apologies - I seem to have found my problem.
On 14 Dec 2007, at 21:29, Martin Linklater wrote:
Hi - I'm drilling down on memory leaks in my code and I'm finding
some strange memory usage that I don't quite understand. I'm calling
'componentsSeparatedByString' on an NSString and I seem to be
finding a memory leak with the NSArray that is returned.
If I release the NSAutoreleasePool after the call the memory for the
NSArray is not free'd up. If I manually release the NSArray I get a
double free error later on in the code when the NSAutoreleasePool is
released.
This doesn't make sense - you either release objects yourself or you
let the NSAutoreleasePool do it right ? With this case I seem to
either get a leak or an error - neither method seems to properly
clean the memory up.
Am I missing something subtle here ? Thanks.
_______________________________________________
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
_______________________________________________
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