• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSArray losing its data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: NSArray losing its data
      • From: Finlay Dobbie <email@hidden>
    • Re: NSArray losing its data
      • From: "Jean-Olivier Lanctôt-D." <email@hidden>
References: 
 >Re: NSArray losing its data (From: "Jean-Olivier Lanctôt-D." <email@hidden>)

  • Prev by Date: How to make a popup view?
  • Next by Date: Re: Jobs
  • Previous by thread: Re: NSArray losing its data
  • Next by thread: Re: NSArray losing its data
  • Index(es):
    • Date
    • Thread