>From looking at the source there's one big memory leak: when
converting a Python value to a Tcl value, if it encounters a
non-string, it calls strobject() on it but never frees its return
value. There's an XXX in the source, so I suppose Steen knows he
should be more sophisticated. Since the resulting string must be kept
alive until after Tcl_Merge (or whatever) has been called, I propose
to pass a list of temporary objects along, to which all such string
objects are appended. Then a DECREF on the list will release all
strings at once.
--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
URL: <http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>