Saturday, August 18, 2012

Zombies and ARC

Apple QA1758:

Prior to iOS 6 / OS X 10.8, using the the Zombies instrument or NSZombieEnabled or the "Enable Zombie Objects" Xcode diagnostic, prevented ARC from “cleaning up” instance variables at deallocation-time. Your -dealloc methods would still be run, however any instance variables that you didn’t explicitly set to nil would be untouched. If an instance variable strongly referenced an object, then that object would be kept alive forever by the abandoned instance variable.

Via Cédric Luthi, who offers a workaround.

Comments RSS · Twitter

Leave a Comment