• 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: Oddness with NSArray (Most likely some other stupid mistake)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Oddness with NSArray (Most likely some other stupid mistake) (From: James Farwell <email@hidden>)

  • Prev by Date: Re: "weak link" framework refs for 10.1 compatibility?
  • Next by Date: Re: NSTimer & NSInternalInconsistencyException
  • Previous by thread: Re: Oddness with NSArray (Most likely some other stupid mistake)
  • Next by thread: Oddness with NSArray (Most likely some other stupid mistake)
  • Index(es):
    • Date
    • Thread