• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: What's most common cause of SIGSEGV and SIGBUS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Re: What's most common cause of SIGSEGV and SIGBUS (From: Ken Tozier <email@hidden>)

  • Prev by Date: Re: What's most common cause of SIGSEGV and SIGBUS
  • Next by Date: Re: What's most common cause of SIGSEGV and SIGBUS
  • Previous by thread: Re: What's most common cause of SIGSEGV and SIGBUS
  • Next by thread: Re: What's most common cause of SIGSEGV and SIGBUS
  • Index(es):
    • Date
    • Thread