How to do something before process get killed in windows

前端 未结 3 1993
清酒与你
清酒与你 2021-01-14 14:26

My program need to occupy some resources. I want it to release those resources before exit. It\'s easy to achieve when the excutable exit normally. However, what if the user

3条回答
  •  庸人自扰
    2021-01-14 15:12

    You cannot handle the scenario if user kill the application forcefully. But you don't have to worry about the resources. Windows will automatically free the resources acquired by your process when it is killed.

提交回复
热议问题