Lets say I created a program in c/c++, where I manually allocated some variables. Then while running the program, I send an interrupt signal (Ctrl-C). Are those variables freed from memory, or will they take up space until the system shuts down?
Also, what if I just created integers that weren't manually allocated, do those variable reside, or do they get deleted immediately.
I'm thinking allocated variables will remain, and regular variables will get deleted (because of the stack). If that is the case, is there any way to free the allocated variables from memory after the program has stopped?
Just curious. :)