user4951
user4951

Reputation: 33050

How Does Implementing Property Works If We Have ARC

-(Business *) currentBusiness
{
    return _currentBusiness;
}

-(void) setCurrentBusiness:(Business *)currentBusiness
{
    _currentBusiness = currentBusiness;
}

Should it be just like that even for strong properties?

I mean with ARC we don't need to call retain release or whatever right?

Upvotes: 0

Views: 64

Answers (1)

jrturton
jrturton

Reputation: 119242

As long as you have declared that the property is backed by that ivar (easiest to do this via @synthesize currentBusiness = _currentBusiness;), yes, this is correct.

I'm assuming you want to do more in the accessor methods than assign/return though otherwise you wouldn't bother implementing them.

Upvotes: 2

Related Questions