• 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: Disposing NSArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disposing NSArray


  • Subject: Re: Disposing NSArray
  • From: mmalcolm crawford <email@hidden>
  • Date: Fri, 1 Jun 2001 07:01:02 +0100

On Friday, June 1, 2001, at 12:03 am, Youngjin Kim wrote:

What's the differerence between two?
array1 = [[NSArray arrayWithObjects:s1,s2,s3,s4,nil] autorelease];
array2 = [[[NSArray alloc] initWithObjects:s1,s2,s3,s4,nil] autorelease];
...
The first one will be released twice -- it's already flagged for release when it's returned to you from the convenience constructor.

See:
http://www.stepwise.com/Articles/Technical/2001-03-11.01.html

mmalc.


References: 
 >Disposing NSArray (From: Youngjin Kim <email@hidden>)

  • Prev by Date: Re: Disposing NSArray
  • Next by Date: Re: Disposing NSArray
  • Previous by thread: Re: Disposing NSArray
  • Next by thread: Re: Disposing NSArray
  • Index(es):
    • Date
    • Thread