Re: seg fault quandry
Re: seg fault quandry
- Subject: Re: seg fault quandry
- From: Ondra Cada <email@hidden>
- Date: Mon, 1 Mar 2004 21:49:44 +0100
On Monday, Mar 1, 2004, at 21:00 Europe/Prague, pmcurry wrote:
n = [NSNumber numberWithInt:2];
[ma insertObject:n atIndex:1];
[n release];
...
Later in my code I have this happening:
[levelSize count] gives 2, but
[levelSize objectAtIndex:1] gives a segmentation fault or bus error!
What am I missing?
You are missing nothing, but the very opposite: you have too much of
something. Namely, of releases. Note that objects created by the
factory method like "classNameWith..." come autoreleased!
---
Ondra Hada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.