Oddness with NSArray (Most likely some other stupid mistake)
Oddness with NSArray (Most likely some other stupid mistake)
- Subject: Oddness with NSArray (Most likely some other stupid mistake)
- From: matt neuburg <email@hidden>
- Date: Mon, 11 Nov 2002 08:00:22 -0800
On Sat, 9 Nov 2002 14:50:47 -0800, James Farwell <email@hidden> said:
>
controller instance to the list. I am having problems with the
>
following code:
>
>
{
>
children = [NSMutableArray arrayWithCapacity:10];
>
[self addNewChild];
>
}
And....poof! "children" is now a pointer to garbage, because the NSMutable array you created has just vanished off the face of the earth. The next time you try to access "children", your program will crash. Read a book, read the docs, read the archives, read "Hold me use me free me", whatever. m.
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart.
http://www.tidbits.com/
_______________________________________________
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.