سؤال

In an Objective-C project, if I am incorporating some C code, does the environmental variable NSZombieEnabled help me debug accidentally de-allocated region which I've done with C code, or does it only work for the Objective-C part?

هل كانت مفيدة؟

المحلول

It only works for Objective-C objects. Instead of dying, the objects turn into zombies which will complain on attempt to send them any message. Since plain memory cannot receive messages, this mechanism makes no sense for it.

You need Valgrind or similar tools for generic memory debugging.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top