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?

+3


source to share


1 answer


The superclass implementation is dealloc

automatically called (as far as I know, the compiler will insert the instruction [super dealloc]

for you).

External link to LLVM docs

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

enter image description here

+13


source







All Articles