Top "Automatic-ref-counting" questions

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

ARC equivalent of autorelease?

If I have this code, + (MyCustomClass*) myCustomClass { return [[[MyCustomClass alloc] init] autorelease]; } This code guarantees the returning object is autoreleased. …

objective-c clang automatic-ref-counting autorelease
dismissViewControllerAnimated does not deallocate viewcontroller

First off: My project is ARC enabled and I'm using storyboard. I have a view controller that pushes a segue (…

ios objective-c storyboard automatic-ref-counting dealloc
Swift, two issues. 1) weak var 2) bang operator for @IBOutlet

Per: @IBOutlet weak var nameLabel: UILabel! Whenever I declare my IBOutlets, i just use var instead of weak var. But …

swift operators automatic-ref-counting iboutlet
Why does the ARC migrator say that NSInvocation's -setArgument: is not safe unless the argument is __unsafe_unretained?

I was migrating a block of code to automatic reference counting (ARC), and had the ARC migrator throw the error …

objective-c cocoa automatic-ref-counting
How to force xcode to use ARC on a specific file?

My project contains XMPPFramework which contains a file that has to be used with ARC. But my project is Non …

xcode build xmpp automatic-ref-counting compiler-flags
Using an ARC static library in a NON-ARC project

I am trying to get this sorted out. I know how to get an ARC project working with files or …

ios compiler-construction automatic-ref-counting workspace
iOS: How can I destroy a Singleton in ARC? Should I?

I have a singleton class that accumulates data until that data is written to my database (if you want to …

ios singleton automatic-ref-counting dealloc
AVAudioPlayer stops playing immediately with ARC

I am trying to play an MP3 via AVAudioPlayer which I thought to be fairly simple. Unfortunately, it's not quite …

objective-c ios avfoundation avaudioplayer automatic-ref-counting
recursive block and retain cycles in ARC

EDIT2: No. The suggested answer is about async calls. I want & need synchronous calls, like in a normal, standard …

objective-c recursion automatic-ref-counting objective-c-blocks retain-cycle