Should I free allocated memory on abnormal termination?

后端 未结 7 1597
無奈伤痛
無奈伤痛 2021-01-17 12:34

My program (a text-mode web browser) is dynamically allocating memory.

I do free unneeded blocks during runtime, of course. And I do free everything before normal te

相关标签:
7条回答
  • 2021-01-17 13:00

    On abnormal termination you want to do as little processing as possible. Minimizing tinkering with the aborting process will mean you can get to as close to the reason for the abort as possible and any further processing can be seen as "contaminating" the process thus making it more difficult to debug.

    0 讨论(0)
提交回复
热议问题