Sorry to repeat a question that has been posed repeatedly, but i couldn't find a specific mention of memory issues. if a process terminates with _exit(0) or _Exit(0) can its memory block be lost to the OS? Thanks, -nuun
相关问题
- gRPC client do not dispose Channel
- localtime_r consuming some memory before program e
- Memory leak with PyYAML
- Why doesn't this Haskell code exhaust the heap
- Memory leak in the empty Activity
相关文章
- How to exit a program with an exit code: C#
- Why does this cause a memory leak in the Haskell C
- Is there any limit on number of html elements, tha
- How can I enable the memory leak tracking with Fas
- InputMethodManager holds reference to the tabhost
- What is the difference between a direct and indire
- There is insufficient system memory in resource po
- Is there any way to force the Javascript Garbage C
In general, no. Operating systems handle that stuff for us.
Not on any decent modern O/S (Unix, Windows, whatever) - the O/S will reclaim the process's memory when the process dies, regardless of how cleanly it died.
For just about any consumer O/S that will not happen. Modern multi-process Operating Systems will release any resources the process may have acquired (memory, locks, open files, etc) when the process shuts down. So I generally feel that memory or resource leaks "don't count" as leaks if I just acquire them at startup (not during runtime possibly repeatedly).
However, there are still lots of embedded/realtime platforms out there for which that is not true. If your program might be run on one of those, you should be scrupulous about freeing up acquired resources. But even there it is often easier to just reboot the device after each use...