Avoid memory wastageThis tip submitted by Arthi on 2005-04-06 04:47:31. It has been viewed 46707 times.
Rating of 5.4 with 285 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!