Is it a waste of time to free resources before I exit a process?
- by Martin
Let's consider a fictional program that builds a linked list in the heap, and at the end of the program there is a loop that frees all the nodes, and then exits. For this case let's say the linked list is just 500K of memory, and no special space managing is required.
Is that a wast of time, because the OS will do that anyway?
Will there be a different behavior later?
Is that different according to the OS version?
I'm mainly interested in UNIX based systems, but any information will be appreciated. I had today my first lesson in OS course and I'm wondering about that now.