controllers, delegates, retain, release ...

2008-02-22 Thread Jack Repenning
I have some code inherited from someone else (so I have no answers to why it's the way it presently is) that's handling retention in a way I find confusing, and think is not in accordance with the spirit of the law. But I can't quite figure out how to do it right. Is there a pattern I

Re: controllers, delegates, retain, release ...

2008-02-22 Thread Quincey Morris
On Feb 22, 2008, at 10:39, Jack Repenning wrote: In the current structure, Controller performs { UI *ui = [[UI alloc] initWithContext: context]; [ui run: @selector(doSomething) title: @Title]; } That is: the UI object is alloc'ed (creating a release obligation), but is not (auto)released

Re: controllers, delegates, retain, release ...

2008-02-22 Thread Jack Repenning
On Feb 22, 2008, at 1:13 PM, Keith Duncan wrote: This would be a problem should the code base ever be compiled with GC support. Interesting point, that retain/release supports a lifecycle model (free-floating, self-managed object) that can't be supported by GC -==- Jack Repenning