Top "Automatic-ref-counting" questions

Automatic Reference Counting (ARC) is a compiler feature that provides automatic memory management of Objective-C and Swift objects.

KVO and ARC how to removeObserver

How do you remove an observer from an object under ARC? Do we just add the observer and forget about …

ios cocoa-touch key-value-observing automatic-ref-counting
@autoreleasepool without ARC?

I'm new to Xcode 4.2, and I'm not yet fully up to speed on ARC. However, I did read that @autoreleasepool …

xcode xcode4.2 automatic-ref-counting
Objective C - Custom setter with ARC?

Here is how I used to write a custom retained setter before: - (void)setMyObject:(MyObject *)anObject { [_myObject release], _myObject = …

objective-c properties automatic-ref-counting
How to enable ARC for a single file

I want to bring a single Objective-C class written using ARC into an old project. The internet provides many references …

objective-c automatic-ref-counting
AutoLayout: removeFromSuperview / removeConstraints throws exception and crashes hard

We use auto layout constraints selectively, primarily to position labels in relation to editable field elements (UITextView, UITextField, typically). However, …

ios automatic-ref-counting autolayout
Capturing 'self' strongly in this block is likely to lead to a retain cycle

I have reqest with block. But the compiler issues a warning "Capturing 'self' strongly in this block is likely to …

ios objective-c automatic-ref-counting objective-c-blocks retain-cycle
Do I need use dealloc method with ARC?

So, I have class: @interface Controller : NSObject { UILabel* fileDescription; } @property(strong, nonatomic) UILabel* fileDescription; Do I need use method dealloc …

iphone ios objective-c automatic-ref-counting
how to use delegates with Automatic Reference Counting

I've jumped on the ARC bandwagon. In the past I would have my delegate properties declared like this: @property(assign) …

iphone ios ios5 automatic-ref-counting
NSError and __autoreleasing

Can someone please explain to me the purpose of having __autoreleasing in the following sample code block? - (void)execute:(…

objective-c automatic-ref-counting
ARC and weak IBOutlet properties

I just updated a project to make use of ARC with the Xcode 4.2 built-in conversion tool. Unfortunately there is a …

objective-c automatic-ref-counting xcode4.2