All those moments will be lost in time...
like tears in rain
-- Roy Batty in Blade Runner
It depends to a great extent on the OS. Most OSes will free the memory for you, some won't. If you develop for a desktop OS now a days, then you can be quite sure that the memory will be freed. That is less so in embedded systems or mobile phones, where in cases the memory will actually get lost up to the next reboot of the OS.