ionelmc / python-lazy-object-proxy

A fast and thorough lazy object proxy.
BSD 2-Clause "Simplified" License
247 stars 36 forks source link

Fix memory leaking proxy implemented in cext.c #10

Closed xowenx closed 9 years ago

xowenx commented 9 years ago

remove Py_INCREF(wrapped) cause PyObject_CallFunctionObjArgs had created a new reference to wrapped

also remove some useless code and make some more pythonic

ionelmc commented 9 years ago

Thanks a lot for this fix. It's in master in https://github.com/ionelmc/python-lazy-object-proxy/commit/22a85449a85ed2e06d035210828d72cebed7cabf - GitHub doesn't seem to detect the rebase.

alvinchow86 commented 9 years ago

thanks! based on preliminary testing this seems to fix the memory leak I reported a while back https://github.com/ionelmc/python-lazy-object-proxy/issues/6