In an application of mine I have some Objective-C classes with C++
instance variables (the Objective-C things own the C++ things). I
build with the option GCC_OBJC_CALL_CXX_CDTORS = YES, i.e. run non-
trivial default constructors and destructors on C++ instance variables
of Objective-C classes.
As long as I do *not* set the environment variable NSZombieEnabled to
YES, everything works like this: Constructors of C++ instance
variables have been called when returning from NSObject's init, and
destructors have been called when returning from NSObject's dealloc.
But if I do set NSZombieEnabled to YES, then the destructors are *not*
called anymore (by the way, setting NSDeallocateZombies to YES or NO
does not make a difference).
I can observe all this with logging and debugging.
Does anybody know, if this is normal behavior, or what else? It looks
like there is an annoying difference: With zombies enabled, dealloc
methods of Objective-C are invoked, but destructors of C++ are not
called.
Mac OS X 10.5.5, Xcode 3.1.2, GCC 4.0, garbage collection off.
Thanks
Klaus
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com