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/2002-May/024366.html below:

[Python-Dev] Overwriting objects before deallocating them

[Python-Dev] Overwriting objects before deallocating them [Python-Dev] Overwriting objects before deallocating themGuido van Rossum guido@python.org
Fri, 24 May 2002 12:01:46 -0400
[Tim]
> I'm not sure why, but there's a widespread intransigent belief that
> it's somehow purer to say "del" for freeing memory that happened to
> hold an object.

I'm the origin of this convention; it was part of Python 0.0.
Switching from [m]alloc/free to new/del was *not* to differentiate
between mere blobs of memory and objects; it was to indicate that
these macros and functions were a layer on top of malloc/free.
(Originally, they merely changed the signature around a bit.)

The new/del names are partly borrowed from C++, where new and delete
are the memory (de)allocation operators as well as the object
(de)allocation operators.

--Guido van Rossum (home page: http://www.python.org/~guido/)




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