For the most part with ARC (Automatic Reference Counting), we don’t need to think about memory management at all with Objective-C objects. It is not permitted to create NSAutoreleasePools...
Can someone briefly explain to me how ARC works? I know it’s different from Garbage Collection, but I was just wondering exactly how it worked. Also, if ARC does...
In my little iPad app I have a “switch language” function that uses an observer. Every view controller registers itself with my observer during its viewDidLoad:. - (void)viewDidLoad {...
I’d like to store an array of weak references in Swift. The array itself should not be a weak reference – its elements should be. I think Cocoa NSPointerArray...
How can I avoid this warning in xcode. Here is the code snippet: [player(AVPlayer object) addPeriodicTimeObserverForInterval:CMTimeMakeWithSeconds(0.1, 100) queue:nil usingBlock:^(CMTime time) { current+=1; if(current==60) { min+=(current/60); current = 0; }...
I have a working app and I’m working on converting it to ARC in Xcode 4.2. One of the pre-check warnings involves capturing self strongly in a block leading...
In the Mac and iOS platforms, memory leaks are often caused by unreleased pointers. Traditionally, it has always been of utmost importance to check your allocs, copies and retains...
I am a little confused about block usage in Objective-C. I currently use ARC and I have quite a lot of blocks in my app, currently always referring to...
Swift has: Strong References Weak References Unowned References How is an unowned reference different from a weak reference? When is it safe to use an unowned reference? Are unowned...
When converting a project to use ARC what does “switch case is in protected scope” mean? I am converting a project to use ARC, using Xcode 4 Edit ->...