Guest_imported
New member
- Jan 1, 1970
- 0
I am using a std::list of pointers, and I add things to this list with push_back() and delete from it with the member function remove(). The problem is, sometimes when I call remove(), it tries to free the list node that holds the value I want to remove and promptly brings up the 'assertion failed' dialog in free_dbg or wherever. Which, I believe, usually means I'm trying to delete an invalid pointer, such as one that is already deleted.
Checking the call stack shows that the pointer in question -looks- to be ok. Now I can't see how anything I've done wrong would cause the stl to accidentally delete one of its own nodes twice or whatever, so has anybody got any idea why it is having trouble deleting list nodes? Or perhaps ideas for finding out what the real problem is?
I'm running VC6, SP4, with the downloaded fixes from the Dinkumware STL page.
Checking the call stack shows that the pointer in question -looks- to be ok. Now I can't see how anything I've done wrong would cause the stl to accidentally delete one of its own nodes twice or whatever, so has anybody got any idea why it is having trouble deleting list nodes? Or perhaps ideas for finding out what the real problem is?
I'm running VC6, SP4, with the downloaded fixes from the Dinkumware STL page.