Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python
Searching equivalent to C++ RAII or deterministic destructors
 

Index | Next | Previous | View Flat


eckhardt at satorlaser

Jul 2, 2009, 12:11 AM


Views: 602
Permalink
Searching equivalent to C++ RAII or deterministic destructors

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

--
http://mail.python.org/mailman/listinfo/python-list

Subject User Time
Searching equivalent to C++ RAII or deterministic destructors eckhardt at satorlaser Jul 2, 2009, 12:11 AM
    Re: Searching equivalent to C++ RAII or deterministic destructors bearophileHUGS at lycos Jul 2, 2009, 2:50 AM
    Re: Searching equivalent to C++ RAII or deterministic destructors eckhardt at satorlaser Jul 2, 2009, 3:12 AM
        Re: Searching equivalent to C++ RAII or deterministic destructors __peter__ at web Jul 2, 2009, 3:46 AM
            Re: Searching equivalent to C++ RAII or deterministic destructors rschroev_nospam_ml at fastmail Jul 2, 2009, 2:28 PM
            Re: Searching equivalent to C++ RAII or deterministic destructors rylesny at gmail Jul 2, 2009, 6:03 PM
        Re: Searching equivalent to C++ RAII or deterministic destructors pavlovevidence at gmail Jul 2, 2009, 11:36 AM
    Re: Searching equivalent to C++ RAII or deterministic destructors davea at ieee Jul 2, 2009, 5:05 AM
        Re: Searching equivalent to C++ RAII or deterministic destructors lists at cheimes Jul 2, 2009, 5:10 AM
            Re: Re: Searching equivalent to C++ RAII or deterministic destructors davea at dejaviewphoto Jul 2, 2009, 6:21 AM
    Re: Searching equivalent to C++ RAII or deterministic destructors __peter__ at web Jul 2, 2009, 5:54 AM
    Re: Searching equivalent to C++ RAII or deterministic destructors eckhardt at satorlaser Jul 3, 2009, 4:58 AM
    Re: Searching equivalent to C++ RAII or deterministic destructors jackdied at gmail Jul 3, 2009, 5:34 AM
    Re: Searching equivalent to C++ RAII or deterministic destructors timr at probo Jul 3, 2009, 1:20 PM
        Re: Searching equivalent to C++ RAII or deterministic destructors aahz at pythoncraft Jul 3, 2009, 9:50 PM
    Re: Searching equivalent to C++ RAII or deterministic destructors pavlovevidence at gmail Jul 4, 2009, 3:47 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.