I have a program and when I input wrong data from the keyboard it just exits with exit(1).
exit(1)
I was testing with Valgrind and while this happens there are
It's a good idea (and in old enough versions of Windows, it was essential), but when a program exit()s on modern operating systems its entire address space is reclaimed.
exit()