本文介绍了如何在进程被杀死时释放资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我很抱歉这个微不足道的问题。当进程被例如任务管理器杀死时,如何释放资源?有没有办法在进程关闭之前调用函数?在此先感谢您的回答。我想我会按照建议实现一个看门狗进程。解决方案 I''m sorry for the trivial question. How I can deallocate resources when the process gets killed by, for example, the Task Manager? Is there a way to call a function before the process gets closed? Thanks in advance Thanks to all for your answers. I think I will implement a watchdog process as suggested. 解决方案 这篇关于如何在进程被杀死时释放资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!