Program wont move past delete : <p>So I can not figure out why my program halts at the delete statement inside my purge loop. It's not crashing it just won't execute or give my any sort of error.</p>

<p>I have double checked that I am deleting an array and need the brackets, and verified that it is valid new memory. It will not work if its called by the destructor or explicitly </p>

<pre><code>int main()
{
    darray DA1;
    DA1.Add("Hello");
    DA1.Add("Good Morning");

    return 0;
}

void Add(const char * string)
{
    char ** temp = new char *[m_count + 1];
    for (int i = 0; i &lt; m_count; ++i)
    temp[i] = m_array[i];
        temp[m_count] = new char[strlen(string)];
    strcpy(temp[m_count], string);
    delete[] m_array;
    m_array = temp;
    m_count++;
}

void Purge()
{
    for (int i = 0; i &lt; m_count; ++i)
    {
        delete [] m_array[i];
        m_array[i] = nullptr;
    }
    delete[] m_array;
        m_array = nullptr;
    m_count = 0;
}
</code></pre>

<p>I expect it to go through the 2d dynamic array deleting each array and then delete the final array.</p>
