|
>> "If these resources are not released at the end of the program, will the memory not be released? What I read in the book is not released until you restart the computer."
This is a mess in the book. Different platforms and different systems deal with this problem differently, but for most modern operating systems, it is unlikely that they will not be released.
However, for "memory leaks", the more important thing is what to do when your program is running? Really useful programs, unlike the practice programs that we usually write, end in a few simple steps, but start in a few hours, a few days, and execute thousands of cycles, even like a bank system It runs day after day without shutting down. At this time, if one byte is leaked on average per cycle, the consequences are unthinkable. |
|