-(void)dealloc - How ? Objective - C
- by sagar
Please Note that - this is not similar than this question.
OK. To understand my question, First of all please see both of these destructors.
- (void)dealloc {
[Marketdetails release]; Marketdetails=nil;
[parsedarray release]; parsedarray=nil;
[Marketid release]; Marketid=nil;
[marketname release]; marketname=nil;
[super dealloc];
}
- (void)dealloc {
[super dealloc];
[Marketdetails release]; Marketdetails=nil;
[parsedarray release]; parsedarray=nil;
[Marketid release]; Marketid=nil;
[marketname release]; marketname=nil;
}
See, Both destructors have different code.
In First Destructor first current class objects are released & then [super dealloc] is called.
In second Desctructor first [super dealloc] is called.
My question is as follows.
Where should we write [super dealloc] ? first or last ? or it doesn't matter ?