title: heap allocation returned from a function
body: <pre><code>The function has a problem: 
  
  void myAllo(int mySize, char *myChar )
  {
      myChar = new char[mySize];
  }
  </code></pre>
  
  <p>Will the heap allocation be returned from <code>myAllo()</code> ? 
  I do not think so, because memory pointed by <code>myChar</code> will 
  be deallocated when <code>myAllo</code> returns. </p>
  
  <p>Right ? </p>
  
  <p>Any comments are welcome. </p>
  
  <p>Thanks</p>