How to check if memory to which pointer p points has been succesfully deallocated?
In few words: you can't.
Check out tools like Valgrind to help you debugging memory leaks issues.
Some other things you should consider:
delete
vector
2.1m questions
2.1m answers
60 comments
57.0k users