c++ allocating objects?
<p>in c++ if I created object thru heap it means it is created at runtime.
if I created object not using new keyword it is created at compile time.</p>

<p>is it okay if I hear the word heap it means runtime?</p>

<p>2nd question </p>

<p>in java if a reference to an object refers to a different object then the object it first refers will get destroyed automatically by garbage collector because no one refers to it.
is same thing happen in c++ like if you create an object along heap, then make a pointer to it, then assign a pointer to that object. 
If that pointer points to a different object what will happen to the object in the heap is this object will destroyed by executing destructor automatically?</p>
