• 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: Arrays containing container -- retain cycle?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Arrays containing container -- retain cycle?


  • Subject: Re: Arrays containing container -- retain cycle?
  • From: Scott Stevenson <email@hidden>
  • Date: Thu, 2 Dec 2004 12:14:34 -0800


On Dec 2, 2004, at 10:38 AM, Matt Budd (Madentec) wrote:

Basically, I want to just have an array of references (like the first example of the single links, but with multiple items), instead of having NSMutableArray retain it's objects and then try to release them when it dealloc's. Is there any work around?

Either use a simple C-style array or look at NSValue's -nontretainedObjectValue.


You can instantiate an NSValue with a pointer to your X or Y objects, and the NSArray will only retain the NSValue object, not the true object it references.

    - Scott


-- http://treehouseideas.com/ http://theobroma.treehouseideas.com/ [blog]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Arrays containing container -- retain cycle? (From: Matt Budd (Madentec) <email@hidden>)

  • Prev by Date: Re: cross development on Jaguar
  • Next by Date: Re: cross development on Jaguar
  • Previous by thread: Arrays containing container -- retain cycle?
  • Next by thread: Authorization Services error when invoking tool from Cocoa framework
  • Index(es):
    • Date
    • Thread