Free The Memory That You UseThis tip submitted by Udhaya Kumar.D on 2005-09-07 02:09:27. It has been viewed 58787 times.
Rating of 5.7 with 259 votes
Clean up memory spaces that are no longer used.
char *msg = new char;
if(val == VALID)
//don't just return.clean the memory that was alloted.
delete  msg;
Help your fellow programmers! Add a tip!