Will the OS really hold onto them after they close program if we don't delete them before closing? |
No. The OS hands out memory to a process, and when the process ends, takes it all back again. Shouldn't matter what the process did with that memory or what state it left things in. The OS takes it back.
A principal problem with never freeing memory is running out of memory. If you never free the memory, but have a program running a long time, always creating new objects, you consume more and more and more until eventually you use all the memory easily available, and the OS either has to start using the hard drive as spare memory (and your program slows down and may become so slow it's unusable, and other programs also become painfully slow because they can't get any memory either, and chunks of their working memory has suddenly been moved to a hard drive, and the OS seems to even freeze if you're unlucky) or the OS might simply decide your program is out of control and kills it stone cold dead without warning.
Associated with this is the problem of finding these memory leaks (a "memory leak" is the term used to describe memory that you have lost the pointer to and thus cannot delete, even if you wanted to). There are tools that can help you find memory leaks. If your code is full of little memory leaks that you don't care about, maybe because they're not recurring so you as programmer know they won't expand massively, you will have a lot of noise to look through before you find the really troublesome memory leaks.
It's not uncommon for many programs to not tidy up their memory fully when they close. It's often harmless. Nonetheless, it is good practice to tidy up your memory, even if only because it forces you to actually think about everything you allocate and design sensibly.
The OS will take care of it for you when the program closes, but as I said above, that might be because the OS has decided to close your out-of-control program for you, without warning.