title: Objective-C++ C++ object destructor
body: <p>I have an Objective-C class which one of it's variables is an C++ object (most of my code is C++, but I need some ObjC classes to integrate with iOS libraries). Does Objective-C++ guarantees that the C++ object will be correctly destroyed when the Objective-C object is destroyed?</p>
  
  <p>Some example code:</p>
  
  <pre><code>class MyCppClass {
      // ...
  };
  
  @interface MyObjCClass : NSObject {
      MyCppClass myCppObject; // is it ok to do it?
  }
  
  // ...
  
  @end
  </code></pre>