A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-November/018384.html below:

Program very slow to finish

[Python-Dev] RE: Program very slow to finish [Python-Dev] RE: Program very slow to finishTim Peters tim.one@home.com
Tue, 6 Nov 2001 18:07:56 -0500
[M.-A. Lemburg wrote:]
> What is considered the "right" approach for this ? Should Python
> objects *always* be deallocated using one of PyObject_Del() and
> PyObject_DEL() or is PyMem_DEL() usable as well ?

I agree with everything Neil said.  Note that the xxx_del/DEL functions are
not destructors, nor do they call destructors.  Despite their arguably odd
names, they don't even care whether you pass a pointer to a Python object.
Without pymalloc enabled, chase down the layers of macros and all any of
them do is call free(), although PyMem_DEL -> PyMem_FREE -> PyCore_FREE ->
PyCore_FREE_FUNC and there's *some* scheme or other hiding in here that's
supposed to let users define their own expansion for at least one of the
steps in that chain.  It's complicated, and I'm not sure anyone understands
all the design details anymore.




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4