How to deallocate pointer-to-pointer-types that point to pointer-types in heap that point to other objects in heap?
<p>So I decided to have some pointer fun tonight :)</p>

<pre><code>CursorHBList::CursorHBList(UINT iNumHB)
    :m_ppCursorHB(nullptr)
    ,m_iNumHB(iNumHB)
{
    if (iNumHB != 0) {
        m_ppCursorHB = new CursorHitBox* [iNumHB];
    }   
}
</code></pre>

<p>so you can see, I've now dynamically allocated pointer-types.</p>

<p>Those pointers will each point to another (single) object in the heap. (later on, not in code sample)</p>

<p>So I've been wondering if I should delete all the pointer-to-object-types pointed to by the pointer-to-pointer-type first, and then delete[] the pointer-to-pointer-type?</p>

<p>Or is there a better way?</p>

<p>EDIT: Without using smart pointers...</p>
