If I created some objects in the heap during the execution of my program; And I know that all these objects will continue to be accessed until the very final lines of codes of main(); Then is it malpractice to not delete the objects in the heap? and is there any actual harm from that behavior?
>Solution :
It is a good general rule to delete the objects when they are not used anymore. However in your case there is no risk of memory leak because when a process exits, all its heap memory is released.