title: Release memory from 2 different DLLs
body: <p>I have 2 dynamic library: dllA and dllB</p>
  
  <p>dllA puts (char* type) to 1 function of dllB and this function alloc memory for <code>char* type</code> and return result to dllA.</p>
  
  <p><strong>DLLB:</strong></p>
  
  <pre><code>getResult(char *rs)
  {
       // calculate to get length
       rs = new char[lenght];
       rs = .... // do something here
  }
  </code></pre>
  
  <p>dllA get result, do something with output and release rs.</p>
  
  <p><strong>DLLA:</strong></p>
  
  <pre><code>getResult(char *rs);
  std::cout &lt;&lt; rs;
  // can not release rs here
  if(rs){
       delete []rs;
  } // crash here
  </code></pre>
  
  <p>But I can not release <code>char* type</code> maybe because memory of <code>char* type</code> is in memory from dllB and we can not access to this memory space.</p>
  
  <p><strong>If I build with debug-mode, it works normally. And it causes error with release-mode</strong></p>