Daily iOS
Memory and ARC

Dangling pointers and Zombie Objects

In what situations does a dangling (wild) pointer, one that touches a deallocated object, arise under ARC?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

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.

Share a question