If I allocated memory in my C program using malloc
and now I want to exit, do I have to free the allocated memory, or can I assume that since my entire program terminates, it will be freed by the OS?
I run in Linux environment.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…