Delete memory in inheritance
<p>I have code below, it always has memory leak please help me.</p>

<p>Thanks,
Ankata</p>

<hr>

<pre><code> class ABCD
{
public:
    ABCD(void);
    ~ABCD(void);

    CString tem1;
    CString tem2;
};

class CDE :
    public ABCD
{
public:
    CDE(void);
    ~CDE(void);
    CString tem;
};

void main()
{
        CList&lt;ABCD*&gt; m;
        CDE *a = new CDE();

        a-&gt;tem1 = "AAA";
        a-&gt;tem2 ="BBB";
        a-&gt;tem ="CCC";

        m.AddTail(a);

        ABCD *b = m.GetTail();
        delete b;   
}
</code></pre>
