prevent memory leak in C+Python
merkosh at hadiko.de
Mon Mar 20 23:24:28 CET 2006
I am wrapping a C function returning large amount of binary data back to
Python using SWIG.
I have the data malloc()ed or new()ed on the heap and buffer objects seem a
good way to wrap it in python
>From the documentation it seems PyBuffer_FromReadWriteObject() will not
release the allocated shared memory. How do I prevent a memory leak in this
Everything you read in newspapers is absolutely true, except for that
rare story of which you happen to have first-hand knowledge.
-- Erwin Knoll
More information about the Python-list