Re: Arrays containing container -- retain cycle?
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