Another question about extending Python
Martin v. Löwis
martin at v.loewis.de
Sat Dec 14 04:52:04 EST 2002
> I fully admit to knowing nothing about embedding Python, but I would
> hope from a library design point of view that this is accomplished
with
> malloc/free callbacks in the library. Even not counting the
differences
> between C and C++, there's a general precept in library design that
> he-who-allocated-it-must-also-free-it.
I'm not entirely sure what a malloc/free callback is, however, most
objects in Python are deallocated by invoking their tp_dealloc routine,
which then invokes free.
Regards,
Martin
More information about the Python-list
mailing list