Another question about extending Python
Erik Max Francis
max at alcyone.com
Fri Dec 13 15:01:02 EST 2002
"Martin v. Löwis" wrote:
> Certainly. You just can't use new if you pass the memory to the Python
> runtime, and the Python runtime frees it (there are very few places
> where the runtime frees memory that you have allocated).
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.
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ The most exhausting thing in life is being insincere.
\__/ Anne Morrow Lindbergh
Max Pandaemonium / http://www.maxpandaemonium.com/
A sampling of Max Pandameonium's music.
More information about the Python-list
mailing list