So, I have class:
@interface Controller : NSObject { UILabel* fileDescription; } @property(strong, nonatomic) UILabel* fileDescription;
Do I need use method dealloc where property fileDescription will equal nil?
For example:
-(void)dealloc { fileDescription = nil; }
If not, who will dismiss memory used by fileDescription?
Generally you don't need to provide a subclassed dealloc
method as ARC manages the lifetime of the instance variables.
However it can be useful to perform clean-up other than releasing objects, for example to remove an observer or close a network connection down cleanly. You are therefore allowed to subclass dealloc
under ARC, but you are not allowed to call [super dealloc]
from within the subclassed method.
In your particular case it's not required, however.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With