[C++-sig] Re: Shared Pointers and Boost.Python

Ingo Lütkebohle ingo at fargonauten.de
Sun Jul 25 14:16:37 CEST 2004

Am Sat, 24 Jul 2004 10:39:50 -0400 schrieb David Abrahams:
> You might want to use register_ptr_to_python<shared_ptr<X> >() for
> some shared pointers if you ever create them from C++ code,

Whats the difference between calling that method and specifying a
shared_ptr in the class_ call?  I noticed the two are mutually exclusive
(getting a failed assertion at runtime otherwise).

I'm commonly using factory methods where the smart ptr is instantiated on
the C++ side.  Mostly using std::auto_ptr.  I once had problems using
a boost::shared_ptr instead (hung on when calling 'del' from python). 
Could that be a related problem?


Soll doch jeder bleiben, wie er gern wäre.

More information about the Cplusplus-sig mailing list