Is it up to the programmer to deallocate on exit()?

前端 未结 4 590
不知归路
不知归路 2020-12-21 09:53

I have a program and when I input wrong data from the keyboard it just exits with exit(1).

I was testing with Valgrind and while this happens there are

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-21 10:16

    It's a good idea (and in old enough versions of Windows, it was essential), but when a program exit()s on modern operating systems its entire address space is reclaimed.

提交回复
热议问题