title: Memory leak while using c++ string
body: <p>When i run valgrind on below program, it reports memory leak. Can you please explain the cause?</p>
  
  <pre><code>#include &lt;string&gt;
  #include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
      char * arr = (char *) ::operator new(sizeof(char));
      string s = arr;
  
      return 0;
  }
  </code></pre>
  
  <ol>
  <li>What exactly happens on line string s = arr? does it make a copy of arr?</li>
  </ol>