Wie wird der Retain-Setter mit @synthesize implementiert?

Ich habe Folgendes in der Kopfzeile:

@property (nonatomic, retain) UIView *overlay;

Und in der Implementierung:

@synthesize overlay;

Dann

UIView *tempOverlay = [[UIView alloc] initWithFrame:CGRectMake(160.0f, 70.0f, 150.0f, 310.0f)];
self.overlay = tempOverlay;
[tempOverlay release];

Ist das nichttempOverlay Variable überflüssig? Kann ich nicht einfach machen:

self.overlay = [[UIView alloc] initWithFrame:CGRectMake(160.0f, 70.0f, 150.0f, 310.0f)];

Antworten auf die Frage(12)

Ihre Antwort auf die Frage