Super dealloc in ARC subclasses
In ARC, I know you don't name [super dealloc]
in any overrides -dealloc
, so I usually remove observers and timers there without doing it. However, if I were to subclass the view I made so that the observation information in the subclass -dealloc
does not get called [super dealloc]
in the implementation of the subclass method, would the super implementation be automatically called to release the observation information handled by the superclass, or would it leak?
source to share
The superclass implementation is dealloc
automatically called (as far as I know, the compiler will insert the instruction [super dealloc]
for you).
Update
Here is the link:
Custom ARC dealloc methods do not require [super dealloc] to be called (this actually results in a compiler error). The circuit is super automated and applied by the compiler. Go to the ARC Release Notes
source to share