4 ms·
The cleanest version IMO is - (void) setFoo:(NSString*)bar { [bar retain]; [foo release]; foo = bar; } which harmlessly increments and decrem
by pshc 15y ago
The cleanest version IMO is
- (void) setFoo:(NSString*)bar {
[bar retain];
[foo release];
foo = bar;
}
which harmlessly increments and decrements for self-assignment.