The heap area (heap) is generally allocated and released by the programmer. If the programmer does not release it, it may be recycled by the operating system when the program ends. Just like if you open too many computer programs, the memory will decrease. When you restart the computer, the memory will come back. However, the unsaved data in some of your programs will be gone http://wudikua123.iteye.com/b ...
When the process (the program you wrote) ends, the operating system will reclaim various resources including memory
No problem, the same piece of memory will be used for other things after the next boot. So the memory is called "volatile storage"
The heap area (heap) is generally allocated and released by the programmer. If the programmer does not release it, it may be recycled by the operating system when the program ends. Just like if you open too many computer programs, the memory will decrease. When you restart the computer, the memory will come back. However, the unsaved data in some of your programs will be gone http://wudikua123.iteye.com/b ...