title: App crashes on Apple LLVM 3.0 but works OK on LLVM GCC 4.2
body: <p>I have a very strange crash when using the Apple LLVM 3.0 compiler.
  So there is some code, that uses <a href="http://assimp.sourceforge.net/" rel="nofollow noreferrer">Assimp</a> to load assets and create the scene (I've excluded all my code and even then it crashes):</p>
  
  <pre><code>aiScene* ai_scene = const_cast&lt;aiScene*&gt;(aiImportFileFromMemory(fileBuf, fInfo.uncompressed_size, aiProcessPreset_TargetRealtime_MaxQuality, NULL));
  
  delete ai_scene;
  </code></pre>
  
  <p>Here is the screenshot of the stack trace for GCC:</p>
  
  <p><img src="https://i.stack.imgur.com/22U8U.png" alt="enter image description here"></p>
  
  <p>And here is for LLVM:</p>
  
  <p><img src="https://i.stack.imgur.com/TAOyf.png" alt="enter image description here"></p>
  
  <p>In LLVM version destructor is called twice (and probably that's why I've got a crash).</p>
  
  <p>I should also mention that all destructor code is located in header file and crashes only on device (tested on iPod 4 and iPad 2).</p>
  
  <p>Is it a bug in LLVM compiler (probably in generation of arm assembly) or did I miss something?</p>
  
  <p>Edit: </p>
  
  <p>in case someone has similar problem use <code>aiReleaseImport(scene)</code> instead of <code>delete scene;</code></p>