The most headache in objective-c language is memory release, declare a variable to be sure to release this variable, I believe many people in the Dealloc function [super Dealloc] position this problem tangled, after practice found, [super Dealloc] Crash is often written in memory before it is released, but not after it has been written. Yes, objective-c can not write their own release within the [Super Dealloc], because "every class you create is inherited from the parent class, the root class, there are many instance variables will inherit, this part of the variable is sometimes used within your program, They don't automatically free up memory, you need to call the parent class's Dealloc method to release it, but before you do, you need to first release the variable memory in your class, or it will cause a memory backlog in your class, causing a leak. " Of course, if you use arc after iOS6.0, you will not encounter this problem. The wrong wording ******
-(void) dealloc
{
[Super Dealloc];
[XXX release];
......
}
The correct wording *******
-(void) dealloc
{
[XXX release];
[Super Dealloc];
......
}
[Super Dealloc] sequence of memory releases