I have three simple questions.
Is the memory used by a dynamic array lost forever if you never deallocate it?
what about after the program ends?
what about after the computer is restarted?
Printable View
I have three simple questions.
Is the memory used by a dynamic array lost forever if you never deallocate it?
what about after the program ends?
what about after the computer is restarted?
These days OSes are smart enough to release all the memory used by a process when it ends, regardless of whether the process freed it or not. With the possible exception of shared memory....I'm not sure about that.