In my program written with C and C++, I will new an object to fulfill the task, then delete the object.
At the moment after new object but before delete object, if t
Pressing CtrlC will send a SIGINT
to the process, which by default does a mostly-orderly shutdown, including tearing down the memory manager and releasing all allocated heap and stack. If you need to perform other tasks then you will need to install a SIGINT
handler and perform those tasks yourself.