When manually implementing @property instead of using @synthesize, do you have to include ARC code?
Would it be ok to implement it like this:
@synthesize var1;
- (void)setvar1:(NSObject *)newVar1
{
var1 = newVar1;
}
or do you have to include retain, release etc?
Under ARC, you don't have to (and in fact cannot) manually retain or release variables. Your implementation, apart from needing a capital V in setVar1:, is perfectly acceptable under ARC.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With