3 ms·
When the program exits memory will be reclaimed by the kernel. Memory leaks aren't horrible if they don't appear in loops or recursive functions (that is to sa
by webkike 9y ago
When the program exits memory will be reclaimed by the kernel.
Memory leaks aren't horrible if they don't appear in loops or recursive functions (that is to say the leaked allocations do not grow with the uptime of the program). In this case it's pretty much identical to allocating memory that has the lifetime of the program.
Pretty obvious stuff but it's important to keep in mind.