Hi Marcus,

Marcus Lindblom wrote:
>
>> Hm, I will have to defer the actual answer to Gerrit. I'll just keep 
>> this situation in mind for the CPtr part, and it's definitely a problem 
>> with boost::shared_ptr (which doesn't support this operation either).
> 
> My 0.02€: Boost::shared_ptr has a number of drawbacks because it 
> supports non-intrusive refcount, which is required in may occations but 
> for frameworks like OpenSG (and my app) it's IMO mostly a hassle. We're 
> using intrusive_ptr and a very simple RefObject base class to handle 
> this for our own classes.

But...

> (However, the weak_ptr support of boost::shared_ptr is nice and more 
> easily supported with external refcounting)

Yup. So my current thinking is that I'll have to write a 
boost::intrusive_shared_ptr/intrusive_weak_ptr to get the best of both worlds, 
as I really can't see how to guarantee that you never need to go shared to *. :(

        Dirk


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to