[C++-sig] Ownership of a C++ object extended in Python using wrapper

Neal Becker ndbecker2 at gmail.com
Wed Mar 17 19:57:40 CET 2010


One tradeoff, I believe,

If you have, say:

class A {
  A (boost::shared_ptr<B>)
  boost::shared_ptr<B> B_obj;
};

Then each time you use B_obj, there is additional dereference overhead IIUC.

If I used with_custodian_and_ward, there should not be this additional 
overhead.



More information about the Cplusplus-sig mailing list