1

Whats the main difference between these 3 attributes ?? some say Unsafe_Unretain is same as weak but in a non ARC env. And some say Unsafe_unretain is the same as Assign in ARC env ? Whats the actual diff ??

1

1 Answer 1

3

From here, next time you can search the question up on google.

Assign is identical to weak except that it does not set pointers to deallocated instances to nil, potentially leaving dangling pointers. Assign and unsafe_unretained are identical in usage.

Use unsafe_unretained in iOS 4 or below, or else, use assign. Weak is different than unsafe_unretained and assign.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.