Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, I could've been more clear I meant "Oh, oops, I stored a reference of every single transaction ever, so we'll never reap that memory (because it will never get its refcount decremented automatically)."

It's not a leak but this kind of thing is often detected as a positive slope in a process' RSS graph and it's common to refer to it as a "memory leak" because from this symptom it's indistinguishable from an actual leak.



That's still a memory leak. It's just caused by a logic error that a compiler couldn't ever catch.


Well, you might think it's a distinction without a difference but in fact it's not a leak. A leak only occurs when the handle one might use to deallocate memory/resources is itself deallocated.

Whether "I added one FramistanObject to the FramistanObjectLog for every single HTTPConnection" is a logic error or not depends on what the intended design was.


Valgrind calls that an indirect leak (stuff that wasn't freed at exit but is referenced by stuff that also wasn't freed)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: