19 points · by soundsop · 18y ago · 8 comments
Disturbing.
unref, free, g_free
One of my professors joked that all non-trivial C and C++ projects begin with hiring a guy who already wrote a garbage collector.
Precisely. You should worry about memory leaks so you don't have web browsers using up 800MiB while doing absolutely nothing and not using any plugins: http://neosmart.net/gallery/v/apps/Firefox/Firefox+Hole.png....
Then again, when you're leaking several hundred MiB per tab in Version 2, you can fix up a memory leak or two, halve the problem, then go around claiming "extraordinary improvements to memory management" come version 3. Oh, wait.....
It's sane (if unsurprising) advice. Using it as evidence for the current state of Firefox's memory management strikes me as a poor idea.
(284M and counting! Yesterday my Linux Firefox was at upwards of 350M, though it's now at 144M after restarting it.)
I'm not defending the FF team - I think they've done a terrible job managing memory in their browser... but it's an understandable mistake and doesn't come from ignoring the rules so much as it is not picturing the entire codebase in your head when passing objects around.