Of cause I know delete corresponding to new and delete  corresponding to new . But sometimes things are not that simple. Imaging you are fixing a bug and need to delete an object somebody else wrote, for example:
std::string *foo = new Foo;
How will you delete it? Pretty much everyone will write:
But this is not necessary right if you look a little bit further until you come across this line:
typedef std::string Foo;
Foo is actually array of strings. So you need to use
delete  foo;
So what’s the lesson learned here? Probably it’s good for you to comment your typedefs, and as a people editing other’s code, look a little bit further. But other than that, my suggestion is to use STL library instead of dynamically allocate arrays of objects unless it’s absolutely necassary.