Free everything you have @property save @synthesize?

I started to tear myself away from my application and got a deep way, and it works great, but I think I let some things work a little.

For each @property (nonatomic, keep) that I then create @synthesize, since I need to have [freeing the variable] in the dealloc method - is this correct?

Even if it is an IBOutlet?

+5
source share
3 answers

Yes. You have declared ownership of the property, making it a property retain, which means that you must renounce ownership by issuing it.

+11
source

, IBOutlet, nil -viewDidUnload. , . ivar nil , ivar, .

+4

. , .

; . dealloc, .

dealloc.

- (void)dealloc {
    [property release];
    [super dealloc];
}
+1
source

All Articles