How to avoid memory leak when user press ctrl+c under linux?

前端 未结 7 2050
眼角桃花
眼角桃花 2020-12-29 15:28

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

7条回答
  •  暖寄归人
    2020-12-29 15:59

    The OS will reclaim the memory allocated by the process when the process exits as a result of Ctrl-C or any other means.

提交回复
热议问题