title: Getting object ID in c++
body: <p>Whenever an object is instantiated from a class I need to capture its  object ID. Is there any boost calls available that would help in catching this info? </p>
  
  <pre><code>Class1 obj1();
  Class2 obj2();
  </code></pre>
  
  <p>I want to know how these objects are stored and if there is an ID associated with it?</p>
  
  <p><strong>EDIT:</strong>
  The purpose of this is to know when the object is to keep track of the object when it is created and destroyed. How many of them are present and whether all of them are destroyed properly.</p>