[C++-sig] alternative smart pointer (intrusive_ptr) example

Alex Mohr amohr at pixar.com
Mon Jul 28 20:46:36 CEST 2008


> The object identity issue is the big one.  Without a custom deleter --
> which is why shared_ptr works so smoothly -- there's little you can do
> about it, AFAIK.

I have a solution to object identity using custom smart pointers, but 
it's quite ugly.  The crux of it is to register your own to and from 
python conversions that do the identity work.  I posted a "sketch" of 
how I do this awhile ago:

http://mail.python.org/pipermail/c++-sig/2008-January/013265.html

Alex




More information about the Cplusplus-sig mailing list