|
|
|
|
|
by derleth
5146 days ago
|
|
> That's acceptable for a command-line program that will terminate quickly No, it isn't; you don't know how quickly the program will terminate, in general, and it only takes one program running longer than you expect to eat a horrible amount of RAM. |
|
The downside to calling free(), apart from performance (malloc/free are extremely expensive), is that messing them up creates bugs that are much worse than simply holding on to some allocator metadata until the program hits exit().