Linked by Jared White on Wed 7th May 2003 07:13 UTC
General Development Welcome back to Part 2 of Cocoa 101: Object-Oriented Programming for the Masses! I received a lot of great feedback on my previous article, and I'm looking forward to sharing with you once again what I've learned about Cocoa and the Objective-C language. If you missed Part 1 of this tutorial, read it here.
Permalink for comment
To read all comments associated with this story, please click here.
call [super dealloc]!
by Lee Harvey Osmond on Wed 7th May 2003 08:28 UTC

If, in your method - (void)dealloc { ... }
you fail to call [super dealloc], as in the example I can see in this article, then your instance variables will be released (and garbage collected), but not those in any superclasses, and ultimately, the object itself will not deallocate. This causes a serious memory leak.