Hi, I am wrapping libsndfile to Python, using SWIG and don't know howto return a malloc()ed memory area back to Python.
I've found CObjects, which would let me pass free() as cleanup function, but
I'd rather return a buffer object (PyBuffer_FromReadWriteMemory) so that I
could prevent copying of data, but I don't know how to prevent the memory
leak then.
Can I install some kind of cleanup hook?
Please also reply to me personally, as I am not on the python-dev list.
Thanks,
Uwe
--
Conway's Law:
In any organization there will always be one person who knows
what is going on.
This person must be fired.
pgplOFkkG4VK3.pgp
Description: PGP signature
_______________________________________________ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
