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.
Thanks.

Member Avatar for MonsieurPointer

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!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.