It causes memory leaks, which, to my understanding are released after the program ends, but it is very bad as it causes unnecessary stress on the computer program execution as it is holding onto variables you don't even need anymore.
At the end of your program, all that memory will be released, so yes the computer WILL take care of it, but if you have a very long program, and a lot of memory leaks, you are essentially making it do extra work for nothing.