title: Manual Object Ownership vs Smart Pointers
body: <p>Right now, object ownership/deletion in my C++ project is manually tracked (via comments mostly). Almost every heap allocated object is created using a factory of sorts </p>
  
  <p>e.g. </p>
  
  <pre><code>auto b = a-&gt;createInstanceOfB(); //a owns b
  auto c = b-&gt;createInstanceOfC(); //b owns c
  //auto k = new K(); //not in the code
  ...
  //b is no longer used..
  a-&gt;destroyInstanceOfB(b); //destroyInstanceOf calls delete on it
  </code></pre>
  
  <p>What benefits, if any, will smart pointers provide in this sitution?</p>