Re: ARC and dealloc

2011-12-08 Thread Matt Neuburg
On Thu, 08 Dec 2011 20:31:51 +0100, Mikkel Islay said: >A twist on the tale, is that the observer wasn't the UIViewController, but a >helper object subclassed from NSObject. Hence view-unloading was one step >further removed from deallocation of the observer-instance. I have *never* added or

Re: ARC and dealloc

2011-12-08 Thread Mikkel Islay
Thanks for the insightful reply, and of course to Jonny Yu and Scott Anguish as well. On 8 Dec 2011, at 17:36, Matt Neuburg wrote: >> You can certainly make assumptions about when dealloc is called - it is >> extremely deterministic, actually. See Greg Parker's discussion (in the WWDC >> 2011

Re: ARC and dealloc

2011-12-08 Thread Matt Neuburg
On Wed, 07 Dec 2011 21:56:56 +0100, Mikkel Islay said: >Dear list, > >A question regarding the proper use of dealloc in ARC-environments (under iOS): >I have a need to unregister NSNotification observers during exchange of >UiViewControllers. Is implementing - (void)dealloc considered a proper u

Re: ARC and dealloc

2011-12-07 Thread Jonny Yu
My understanding is, due to auto release semantics, your object might be auto released again during current pool draining. So it will be put into outer Autorelease Pool, that's to say the dealloc are not guaranteed to be executed at specific timing. ARC still relies on retain/release/autorelease

ARC and dealloc

2011-12-07 Thread Mikkel Islay
Dear list, A question regarding the proper use of dealloc in ARC-environments (under iOS): I have a need to unregister NSNotification observers during exchange of UiViewControllers. Is implementing - (void)dealloc considered a proper use for this purpose? Is it safe to make assumptions regarding