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