T
Tony Johansson
Hello experts!!
I reading in a book about C++ and there is something that I'm not sure
about. I don't belive that the book is wrong but
I will just ask you out there what you think.
The book says the following "Note that you cannot assume that all resources
are automatically released when the
entire program tetminates. While this is true for resources allocated
exclusively for
this program, such as internal memory, there are other resources obtained
from the
operating system, such as file locks or ports, that must be explicitly
released when the program terminates."
My question I thought that when a program terminates all resources no matter
if it's file lock, ports, memory or something else) is released
automatically when the program terminate. Is the book right or wrong?
Many thanks!
//Tony
I reading in a book about C++ and there is something that I'm not sure
about. I don't belive that the book is wrong but
I will just ask you out there what you think.
The book says the following "Note that you cannot assume that all resources
are automatically released when the
entire program tetminates. While this is true for resources allocated
exclusively for
this program, such as internal memory, there are other resources obtained
from the
operating system, such as file locks or ports, that must be explicitly
released when the program terminates."
My question I thought that when a program terminates all resources no matter
if it's file lock, ports, memory or something else) is released
automatically when the program terminate. Is the book right or wrong?
Many thanks!
//Tony