Wednesday, January 28, 2015

Difference between "assign" and "retain" keyword ?

Retain - Specifies that retain should be invoked on the object upon assignment. takes ownership of an object. in ARC the reference count gets increased by one. in GC there is strong reference for it.

Assign - Specifies that the setter uses simple assignment. Uses on attribute of scalar type like float, int.

0 comments:

Post a Comment

About

Blog Archive

Powered by Blogger.

Blog Archive