title: Does std::string::assign takes "ownership" of the string?
body: <p>I have some gaps in the understanding of <code>string::assign</code> method. Consider the following code:</p>
  
  <pre><code>char* c = new char[38];
  strcpy(c, "All your base are belong to us!");
  std::string s;
  s.assign(c, 38);
  </code></pre>
  
  <p>Does <code>s.assign</code> allocate a new buffer and copy the string into it or it assumes ownership of the pointer; i.e. doesn't allocate new memory and uses directly my address. If it copies, then what is the difference between <code>assign</code> and <code>operator=</code>? If it doesn't copy, then does it free the memory or it is my responsibility?</p>
  
  <p>Thank you.</p>