Re: NSArray losing its data
Re: NSArray losing its data
- Subject: Re: NSArray losing its data
- From: Ondra Cada <email@hidden>
- Date: Sun, 17 Nov 2002 20:19:55 +0100
On Sunday, November 17, 2002, at 07:43 , Jean-Olivier Lancttt-D. wrote:
1) initWithCapacity is a NSMutableArray -only instance method.
That's not true. Where you got the impression from?
2) If you claim that [[NSMutableArray alloc]
initWithCapacity:0] returns an autoreleased instance
'Course it does not.
Why do you initWithCapacity:0? You didn't answer that question.
From the doc
- (id)initWithCapacity:(unsigned)numItems
Initializes a newly allocated array, giving it enough memory to hold
numItems objects. Mutable arrays expand as needed, so numItems simply
establishes the object's initial capacity. Returns self.
If you ask the array to init with 0 numItems, then you can't add NOTHING
to that array.
Right?
Wrong, unless you meant those two negatives to cancel each other ;)
---
Ondra Cada
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.