Re: Manual reference counting and doubly-linked lists

2012-11-15 Thread Uli Kusterer
On Nov 15, 2012, at 4:59 AM, William Squires wrote: > @interface Thing : NSObject > > @property (nonatomic, ???) Thing *nextThing; > @property (nonatomic, ???) Thing *prevThing; > > @end > > and somewhere I keep a reference to the 'head' of this doubly-linked list. > What should ??? be, "retai

Re: Manual reference counting and doubly-linked lists

2012-11-15 Thread Roland King
On 15 Nov, 2012, at 12:47 PM, Daniel DeCovnick wrote: > Strong/retain for next, weak/assign for previous. > On Nov 14, 2012, at 7:59 PM, William Squires wrote: > >> >> @interface DoublyLinkedListClass >> >> @property (nonatomic, retain) Thing *head; >> >> @end >> >> "doublist.m" >> @implem

Re: Manual reference counting and doubly-linked lists

2012-11-14 Thread Daniel DeCovnick
Strong/retain for next, weak/assign for previous. On Nov 14, 2012, at 7:59 PM, William Squires wrote: > Let's say I have: > > @interface Thing : NSObject > > @property (nonatomic, ???) Thing *nextThing; > @property (nonatomic, ???) Thing *prevThing; > > @end > > and somewhere I keep a referen

Manual reference counting and doubly-linked lists

2012-11-14 Thread William Squires
Let's say I have: @interface Thing : NSObject @property (nonatomic, ???) Thing *nextThing; @property (nonatomic, ???) Thing *prevThing; @end and somewhere I keep a reference to the 'head' of this doubly-linked list. What should ??? be, "retain", or "assign" in order to work properly? If I was