I would like to know if there is any difference between calling [super viewDidUnload] before realeasing properties or after it.
Thank you!
self.webView = nil; self.fullText = nil; [super viewDidUnload];
or
[super viewDidUnload]; self.webView = nil; self.fullText = nil;
This depends on what the superclass does in viewDidUnload
. If it's just a standard UIViewController
, either will do because -[UIViewController viewDidUnload]
does nothing.
I never thought it mattered, but we just found a bug where the app crashed calling it first. The trend at my office has been to call it last, but the Apple template puts it first.
You can do what you want, but I will always call it last from now on.
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