Quote:Original post by Zahlman
First: What's a cenemy? (What are you hoping to accomplish by putting a 'C' in front of the class name? Whoever told you to do this was, with 99.9% confidence, completely misguided.)
These things bother me enough that I've taken the liberty of deleting the offending 'C's from the rest of this post (including in quotations). :)
I agree (although I'm not offended to the same extent). Use namespaces to avoid naming clash (or to distinguish that it's code from a particular source), rather than the letter C.
-------------
With regards to the current question, you say you don't use new at all in the whole project, yet the first code snippet pasted made use of new (and was not freeing the memory when you called erase). Are you sure??? If you're allocating memory when pushing something into a vector, you will NEED to free that memory before removing it from the vector (since the pointer would most likely be lost after the call to erase).