3 ms·
Let's keep things in perspective. I'll take ten memory leaks over one segmentation fault any day. Also, not every forgotten pointer constitutes a memory leak.
by pfedor 18y ago
Let's keep things in perspective. I'll take ten memory leaks over one segmentation fault any day. Also, not every forgotten pointer constitutes a memory leak. To talk about a memory leak, your program has to eat up the amount of memory proportional to its running time, or input size. If you just allocate some constant memory for your data structures at startup it is not a memory leak. Still of course it's nice to free it up at exit (for example for reasons mentioned in the article) but sometimes it's not convenient or practical. So let's not get too uptight about it.