First one:
- (void)dealloc {
[super dealloc];
[AboutButton release];
}
Second one:
- (void)dealloc {
[AboutButton release];
[super dealloc];
}
Both methods are delloc, first run the super first, the other run it later, which one is correct or there is no diff between two. thz.
There is a difference, in that you are guaranteed the existence of ivars in the super class prior to the call to
[super dealloc]. After that call, the ivars will be gone.I don’t know if calling
[super dealloc]first will create a problem, but the Class Reference forNSObjectsays you should free your memory first, and then call[super dealloc]