• 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: releasing a object containing others in a array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: releasing a object containing others in a array


  • Subject: Re: releasing a object containing others in a array
  • From: Roland King <email@hidden>
  • Date: Sat, 3 Oct 2009 16:33:38 +0800

Well follow the memory management rules. You retained the objects when you put them in the array so you must release them.



On 03-Oct-2009, at 16:10, Nick Rogers <email@hidden> wrote:

Hi,

I have a class as following:

@interface NodeTypeOrph : NSObject {
   int                count;
   ItemTypeOrph    *key[4];   // Warning: indexing starts at 0, not 1
   NodeTypeOrph    *branch[5];   // Fake pointers to child nodes
}

when I'll send a release to an object of this type, will it automatically release the arrays of ItemTypeOrph and NodeTypeOrph objects.
Or do I have to explicitly traverse and release?


Wishes,
Nick

_______________________________________________

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
_______________________________________________

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


References: 
 >releasing a object containing others in a array (From: Nick Rogers <email@hidden>)

  • Prev by Date: Re: NSLayoutManager and best override point for temporary attributes
  • Next by Date: objc_atomicCompareAndSwapInstanceVariable
  • Previous by thread: releasing a object containing others in a array
  • Next by thread: Re: releasing a object containing others in a array
  • Index(es):
    • Date
    • Thread