I work with memory allocation and suppose the allocation failed. Do I have to free all the memory in the program before I exit ? Is this really necessary ? Can exit() be enough ?
And if I do need to free all the memory in the program, suppose I have large program with a lot of information in it. How can I manage to do that?