circular reference memory leak in C++
<p>I am reading safe C++ and author mentioned about circular reference as below.</p>

<p>Consider two objects containing pointers to each other</p>

<pre><code>class A;

class B { public: A* a; };

class A { public: B* b; };
</code></pre>

<p>This situation is known as a "circular reference". Pointers exist to A and to B, but if there are no ohter pointers to atleast one of these objects from somewhere else, there
is no way to reclaim the memory for either variable and therefore you create a memory leak. These two objects will live happily ever after and never be destroyed.</p>

<p>My question</p>

<ol>
<li>Why there is memory leak? Why is it bad idea to delete memory in destructor of corresponding class?</li>
<li>On what basis author mentioned that two objects live ever after?</li>
</ol>

<p>Thanks for your time and help</p>
