title: Memory allocation/deallocation when working with C# and C++ unmanaged
body: <p>I am working with some C# and C++ unmanaged code and there are two things I don't understand when dealing with memory. If someone can help me understand:</p>
  
  <ol>
  <li><p>If a variable is dynamically allocated under C# (using new) and then is passed to the C++ unmanaged code. Does that variable memory needs to be deallocated manually under the C++ unmanaged code by the user ?</p></li>
  <li><p>If a variable is dynamically allocated under C++ unmanaged (using new) and then passed to C#, is it safe to say the Garbage Collector will deallocate that memory ? </p></li>
  </ol>