Searching equivalent to C++ RAII or deterministic destructors
Ulrich Eckhardt
eckhardt at satorlaser.com
Thu Jul 2 03:11:48 EDT 2009
Hi!
I'm currently converting my bioware to handle Python code and I have
stumbled across a problem...
Simple scenario: I have a handle to a resource. This handle allows me to
manipulate the resource in various ways and it also represents ownership.
Now, when I put this into a class, instances to that class can be shared,
using Python's reference counting. What I'm missing is a way to
automatically release the resource, something which I would do in the
destructor in C++.
Any ideas how to solve this?
Uli
--
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
More information about the Python-list
mailing list