+ 2
does heap allocated memory delets after program shut?
2 Respostas
+ 7
Most operating systems will deallocate the memory when your program ends. However, the C++ standard doesn't guarantee that the OS will clean up the memory for you. It is good practice to deallocate it explicitly for reasons.
https://stackoverflow.com/questions/677812/is-there-a-reason-to-call-delete-in-c-when-a-program-is-exiting-anyway
+ 2
It depends on the operational system. Most do, but a custom made operational system might not.