FROM : Scott Stevenson
DATE : Thu Dec 02 21:14:34 2004
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]
DATE : Thu Dec 02 21:14:34 2004
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]
| Related mails | Author | Date |
|---|---|---|
| Matt Budd (Madente… | Dec 2, 19:38 | |
| Scott Stevenson | Dec 2, 21:14 |






Cocoa mail archive

