title: string.c_str() deallocation necessary?
body: <p>My code converts C++ strings to CStrings somewhat often, and I am wondering if the original string is allocated on the stack, will the CString be allocated on the stack as well? For instance:</p>
  
  <pre><code>string s = "Hello world";
  char* s2 = s.c_str();
  </code></pre>
  
  <p>Will <code>s2</code> be allocated on the stack, or in the heap? In other words, will I need to delete <code>s2</code>?</p>
  
  <p>Conversely, if I have this code:</p>
  
  <pre><code>string s = new string("Hello, mr. heap...");
  char* s2 = s.c_str();
  </code></pre>
  
  <p>Will <code>s2</code> now be on the heap, as its origin was on the heap?</p>
  
  <p>To clarify, when I ask if <code>s2</code> is on the heap, I know that the pointer is on the stack. I'm asking if <em>what it points to</em> will be on the heap or the stack.</p>