Re: seg fault quandry
Re: seg fault quandry
- Subject: Re: seg fault quandry
- From: Sherm Pendley <email@hidden>
- Date: Mon, 1 Mar 2004 15:38:16 -0500
On Mar 1, 2004, at 3:00 PM, pmcurry wrote:
n = [NSNumber numberWithInt:5];
<snip>
[n release];
You're breaking the basic rule of memory management: If you obtain an
object with +alloc, +copy, or +new, or if you send it a -retain, then
you need to release it. Otherwise you don't.
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.