It goes away, as in, the operating system cleans it up. Any memory the program asked for, the OS knows about, so when the program shuts down, any memory used by it gets freed, and is available for use by other programs. I believe it becomes available immediately.