does python have useless destructors?
Terry Reedy
tjreedy at udel.edu
Sat Jun 12 00:33:39 EDT 2004
"David Bolen" <db3l at fitlinxx.com> wrote in message
news:u4qpi7yw0.fsf at fitlinxx.com...
> Resource Acquisition is Initialization.
,,,
> It comes from a common method in C++ of using stack-allocated objects
> to own or manage resources, because of the explicit construction and
> destruction semantics of C++ objects (and their members) during
...
> I'm not sure if RAII is intended to also cover non-stack based
> objects, in terms handing ownership of the object reference equating
Thanks. This makes it much clearer what behavior some people miss, and why
the behavior is hard to simulate in CPython (all PyObjects are heap
allocated).
Terry J. Reedy
More information about the Python-list
mailing list