Quote Originally Posted by wysota View Post
Oh, you meant clear()... No, I didn't miss it. The vector goes out of scope and so it gets cleared anyway. But even if I did miss clear, it would only make my app hold an additional of 45000*sizeof(int*) = ~180kB of memory.
Sorry , but have a look at the code again. vecs is declared before the outermost for loop so it wont get cleared.
I am not sure how it relates here but deleting an invalid pointer does result in unexpected behavior.