

Hunting memory leaks in Python - wave
http://mg.pov.lt/blog/hunting-python-memleaks

======
pmjordan
So, 'zope.app.error.error._temp_logs' was filling up with data. So that's a
memory leak in Zope, not Python.

The article does show a graphical, partly automated technique for tracking
this stuff down though, which is nice. Really though, it's just another
example of common mistakes from static/global variables or singletons.

------
wave
"...Python is a garbage-collected language! How can it leak memory?... The
trouble is that sometimes an object created by the test is referenced from a
global variable, and that keeps it from being collected"

~~~
ovi256
More proof that global variables are bad.

~~~
icey
To me it seems like it's more proof that bad developers will continue to be
bad, regardless of the language they're working in.

------
GrandMasterBirt
I found a few thread leaks in my work's java suite. Unfortunately it was due
to the fact that our thread monitor (good thing we put it in) started spazing
out. I asked "why so many threads", and found the answer "because we created
daemon threads and lost reference to them, there was nothing to stop any of
them, so they kept getting created, and re-created, etc, and they all kept
running for the entire suite."

Now if I could figure out why rebuilding the database takes 7 minutes vs 20
seconds that it used to take i'd start really saving time during dev.

