Re: Oddness with NSArray (Most likely some other stupid mistake)
Re: Oddness with NSArray (Most likely some other stupid mistake)
- Subject: Re: Oddness with NSArray (Most likely some other stupid mistake)
- From: Andreas Mayer <email@hidden>
- Date: Mon, 11 Nov 2002 04:15:17 +0100
Am Samstag, 09.11.02 um 23:50 Uhr schrieb James Farwell:
- (void)awakeFromNib
{
children = [NSMutableArray arrayWithCapacity:10];
[self addNewChild];
}
arrayWithCapacity: is a so-called convienience constructor. Those
return objects which are autoreleased. So you either have to retain
that array, or you use alloc/init like Ondra suggested.
bye. Andreas.
_______________________________________________
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.