It happened that I need to manage some other people's source code. In the source, I found that a pointer it was instantiated as below was not freed after being used:
TCHAR** val= NULL;
val = new TCHAR*[MAX_NB];
However, I am unsure the appropriate way to free up the pointer. I am wondering the followings:
delete val; // <----- is this appropriate? or should it be "delete val" ?
I am quite young on c++ programing, and need some advice from experts.