Another memory leak found and killed (Yet I feel no joy... 7, almost 8 days tracking down leaks and it's *still* losing memory...)


Yet another leak discovered and fixed. Basically there was code that had started out storing a single object as the value in a dictionary. When checking whether to delete that object (a callback for a timeout), the code was checking to see whether the object it was about to delete really was the deferred object it was intending to delete (in case something else got registered with that key in the meantime).

Later on, the code changed to storing 2 objects as the value, so the is check on the deferred object was failing, and the code didn't bother to delete the reference from the dictionary which leaked every time a getTable query timed out.

Upshot is, there's a new TwistedSNMP release. It even has some sample code on the web-site (I wound up writing it to see if the simplest possible use-cases could leak memory, so figured I'd add it to the documentation-set).

Comments

Comments are closed.

Pingbacks

Pingbacks are closed.