ARC Qualifiers
There are four ARC qualifiers for object ownership that tell the compiler how to handle each object. The qualifiers are specified either implicitly (__strong
is the default) or explicitly when declaring an object.
__autoreleasing: autoreleasing
is not the same as autorelease
; rather, it is used for passing an object by reference, as in this example:
__autoreleasing NSError *error = nil;self.listArray = [moc executeFetchRequest:fetchReq error:&error];
__strong: strong ...
Get iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.