
Most Memory Leaks are Good - joshuacc
http://www.shopify.com/technology/4321572-most-memory-leaks-are-good
======
eis
Memory leaks are not good, ever. The author just has a wrong definition of
memory leak.

    
    
      A memory leak is any memory that is allocated, but never freed
    

This is not a memory leak in most people's books. A real memory leak is memory
that is allocated, not used anymore by the application and never freed.

This is a small but important difference. What the author described as "good
memory leak" is just allocated memory.

------
zwieback
Wow, I had never really appreciated the fact that people working in GCed
languages had to deal with memory leaks. One of the things I enjoy in the
limited time I work away from C and C++ is not having to worry about memory
leaks but I guess it can happen depending on the complexity of the system and
what you're plumbing together.

I'm wondering, though, is there no way to point back at the code that did the
allocation? We used to instrument our heap management routines to give us
whatever info we need to figure out who the offending allocator is, e.g.
functions, line numbers, thread IDs, etc.

------
jerrya
Misleading headline , but a nice, and useful, anecdote about the techniques
they used to find a memory leak, ending with a good explanation of why the
typical ruby tools would not be able to find it.

------
smackfu
I was expecting this to be an essay on how memory leaks are good because they
expose code bugs that only are exposed in long-running code, that would never
be found normally or in unit testing.

