[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-cpp-sig
Subject:    Re: [C++-sig] copy constructors and multiple instances
From:       Dave Abrahams <dave () boostpro ! com>
Date:       2011-09-02 19:19:58
Message-ID: m21uvyg3a9.fsf () boostpro ! com
[Download RAW message or body]


on Thu Sep 01 2011, Jim Bosch <talljimbo-AT-gmail.com> wrote:

> boost::python::register_ptr_to_python< boost::shared_ptr<Scene> >();
>
> This allows you to return shared_ptr to Python, but because a
> boost::shared_ptr can use an arbitrary deleter, Boost.Python can
> convert any wrapped Scene object (even one that doesn't hold a
> shared_ptr<Scene>) into a shared_ptr<Scene> with correct reference
> counting.

I might have forgotten by now, but I don't think you need to register
shared_ptr, and I don't think the above will have any effect.  IIRC I
made sure shared_ptr support "just works" out-of-the-box.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic