For any consumer O / S that does not happen. Modern multiprocessor operating systems will free up any resources that a process can receive (memory, locks, open files, etc.) when the process ends. Therefore, I usually feel that a memory or resource leak is not “considered” a leak if I just acquire them at startup (not at runtime, possibly repeatedly).
However, there are still many built-in / real-time platforms for which this is not true. If your program can be run on one of them, you should be scrupulous about releasing acquired resources. But even there, it is often easier to simply reboot the device after each use ...
TED source
share