Como o retentor de retenção é implementado com @synthesize?
Eu tenho o seguinte no cabeçalho:
@property (nonatomic, retain) UIView *overlay;
E na implementação:
@synthesize overlay;
Então:
UIView *tempOverlay = [[UIView alloc] initWithFrame:CGRectMake(160.0f, 70.0f, 150.0f, 310.0f)];
self.overlay = tempOverlay;
[tempOverlay release];
Não é otempOverlay
variável acima desnecessária? Não posso simplesmente fazer:
self.overlay = [[UIView alloc] initWithFrame:CGRectMake(160.0f, 70.0f, 150.0f, 310.0f)];