Dangling pointers and Zombie Objects
In what situations does a dangling (wild) pointer, one that touches a deallocated object, arise under ARC?
In what situations does a dangling (wild) pointer, one that touches a deallocated object, arise under ARC?
It comes from references ARC doesn't track: pointers pulled out through unowned(unsafe), Unmanaged, or UnsafePointer, ObjC assign or __unsafe_unretained properties, and context pointers handed to C callbacks. Plain unowned traps, which is defined behavior, so it isn't dangling.
Memory and ARCShort answerBasics
Before ARC, Objective-C code called retain, release, and autorelease directly. What did…
#objective-c
Memory and ARCMultiple choiceBasics
In Objective-C, why do you use copy instead of strong for an NSString property, as in…
#objective-c
Memory and ARCMultiple choiceAdvanced
In Objective-C you declare @property (atomic) int a; and run self.a = self.a + 1 a…
#objective-c
Build and distributionShort answerAdvanced
A shipped app has a critical bug and you can't wait for App Store review. Why did Apple…
#objective-c