> However, my scripts are getting killed due to excessive memory usage.
I see what you mean. It is disastrous. As far as I can see, the problem is inherent in the way the C routines were wrapped, and cannot be solved with a few Py_XDECREFs. Today I started working on a thorough rewrite of the wrapper, using a different approach from the original. It's too early to say when or whether I will be successful.