Re: What's most common cause of SIGSEGV and SIGBUS
Re: What's most common cause of SIGSEGV and SIGBUS
- Subject: Re: What's most common cause of SIGSEGV and SIGBUS
- From: Sherm Pendley <email@hidden>
- Date: Sat, 13 Mar 2004 23:48:08 -0500
On Mar 13, 2004, at 11:35 PM, Ken Tozier wrote:
while (object = [enumerator nextObject])
{
kvParts = [object componentsSeparatedByString:@"="];
[keys addObject:[kvParts objectAtIndex:0]];
[values addObject:[kvParts objectAtIndex:1]];
[kvParts release]; // <- commenting out this line stops the crashes
}
Not releasing "kvParts" seems really leaky to me. Is this a real leak
No, it's not a leak. You didn't create kvParts with +alloc or -copy,
and haven't sent it a -retain. Therefore you are not responsible for
releasing it.
sherm--
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.