• 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: resetting ivars safely
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: resetting ivars safely


  • Subject: Re: resetting ivars safely
  • From: Charles Steinman <email@hidden>
  • Date: Thu, 13 Sep 2007 09:41:45 -0700 (PDT)

--- Daniel Child <email@hidden> wrote:

> A. Use a convenience constructor....
> [NSMutableArray array] OR
> [NSMutableArray arrayWithCapacity:]
> But do I have to worry that it will get autoreleased
> prematurely?
>
> B. Use alloc init autorelease [[NSMutableArray
> alloc] init]
> autorelease].
> Same question: could it get released too soon?

You should read the Cocoa memory management
documentation.

http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Concepts/ObjectOwnership.html#//apple_ref/doc/uid/20000043-BEHDEDDB

Cheers,
Chuck



____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: resetting ivars safely
      • From: Daniel Child <email@hidden>
References: 
 >Re: resetting ivars safely (From: Daniel Child <email@hidden>)

  • Prev by Date: SOLVED: Cocoa, iTunes, AppleScript - performance issue BUT a Question arises
  • Next by Date: Re: Incremental Development?
  • Previous by thread: Re: resetting ivars safely
  • Next by thread: Re: resetting ivars safely
  • Index(es):
    • Date
    • Thread