- (void)dealloc
{
[refreshProgressInd release];
[DetailsObject release];
List=nil;
[List release];
[mapView release];
addAnnotation=nil;
[addAnnotation release];
[reverseGeocoder release];
[super dealloc];
}
– (void)dealloc { [refreshProgressInd release]; [DetailsObject release]; List=nil; [List release]; [mapView release]; addAnnotation=nil; [addAnnotation
Share
Don’t set a variable to
nilbefore releasing it, otherwise thereleasemessage gets discarded when it should have been sent to an object.Keep in mind that
deallocis the last thing to be invoked before your object is actually deallocated, so setting variables tonilis often unnecessary.