Alex Rivera | Logout

Do Small Memory Leaks Matter Anymore?

Asked 2009-11-12T01:23:35.030
27

With RAM typically in the Gigabytes on all PC's now, should I be spending time hunting down all the small (non-growing) memory leaks that may be in my program? I'm talking about those holes that may be less than 64 bytes, or even a bunch that are just 4 bytes.

Some of these are very difficult to identify because they are not in my own code, but may be in third party code or in the development tool's code, and I may not even have direct access to the source. In those cases, it would involve lengthy communication with the vendors of these products.

I have seen the number one memory leak question here at SO: Are memory leaks ever ok? and the number one answer to that, as of now voted up 85 times, is: No.

But here I'm talking about small leaks that may take an inordinate amount of debugging, research and communication to track down.

And I'm only talking about a simple desktop app. I understand that apps running on servers must be as tight as possible.

So the question I am really asking is, if I know I have a program that leaks, say 40 bytes every time it is run, does that matter?

A Single Drip
(source: beholdgenealogy.com)


Also see my followup question: What Operating Systems Will Free The Memory Leaks?


Postscript: I just purchased EurekaLog for my program development.

I found an excellent article by Alexander<

Edit
Report

1 Answer

4

I am in the same boat as you. I have small memory leaks that don't grow ever. Most of the leaks are caused by improperly tearing down COM objects. I have studied the leaks and come to realize the time and money to fix them is disproportional to the damage the leaks do. Windows cleans up most of the time so the true damage is only realized if the user runs his computer for years without rebooting.

I think it's acceptable to leave in the leaks. It sounds so taboo, but if the leaks never ever ever grow and they are small, it's pretty insignificant in the larger scheme of things.

answered 2009-11-12T01:31:07.413

Your Answer