VS 2005 pains

This is interesting, I am moving a vc++ project to VS 2005.  When i run it in debug mode i receive this error:

---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Assertion Failed!

Program: c:\Dev\Point\PointMain\Debug\Winpoint.exe
File: dbgdel.cpp
Line: 52

Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.


This I can trace back to the call to delete in this function:

    void RemoveIt(CDlgAncItem* item)
    {
        if (item)
        {
            RemoveIt(item->next);
            delete(item);
        }
    }

The CDlgAncItem is a class it has a destructor and a copy constructor.  I am not sure why the debugger is losing track of the memory, Its a pretty simple data structure stored in a dynamically allocated link list.
Edit: I found a solution.
Comments [0]