Hi guys,
Lets say I create a class pointer in my program, do I need to delete the pointer I created before I close the program?
Or will the pointer be deleted automatically whenever I exit the program?
Will it cause the PC memory to be locked up if I didn't delete? In another words, the available PC memory becoming less and less?
Please advice.

Member Avatar

Any resources allocated by a program will be freed once that program ends. However, it is always good programming practice to free any allocated resources (memory) before a program terminates!