I have an Objective-C class, one of which is a C ++ object (most of my code is C ++, but I need some ObjC classes to integrate with iOS libraries). Does Objective-C ++ guarantee that a C ++ object will be correctly destroyed when an Objective-C object is destroyed?
Code example:
class MyCppClass { // ... }; @interface MyObjCClass : NSObject { MyCppClass myCppObject; // is it ok to do it? } // ... @end
source share