I have a doubt about the role of the operating system in regards to a process lifetime right now. I am using Linux.
Suppose that I have an application that creates a set of objects in the heap using new
. During the lifetime of the application I have no need to delete any of those objects except at the exit the application or on an exception before exiting to do the clean-up.
Suppose I don't call delete at the end of the application for all those objects, do usually the OS reclaim/free all the heap allocated to make it available again at the process exits? If the process exit because of an exception or call to return or exit, does this always occurs?
If this is true this means that if I don't call delete
there won't be any impact on the OS or on the other applications running on a machine. Right?
I usually use boost shared pointers
or use delete
but I would like just to clarify this doubt in a OS/Linux context
Kind Regards AFG