I have been trying to manipulate pointers just for the sake of studying. I have had some problems with some programs I wrote where I had memory leak.
Does this memory stay allocated even when the program returns?
- If yes how to deallocate it?
- If no why, isn't all saved in heap so only the one who has that heap pointer can deallocate? Or does the operating system pull some magic tricks?