title: When to make a object delete itself?
body: <pre><code>Callback* p = new Callback;
  function(p);
  </code></pre>
  
  <p>If I want to delete the callback object, when and how to delete that?</p>
  
  <p>If it gets deleted early, then the callback might fail with segmentation fault.</p>