My case is like that: I have a number of polymorphic objects which can be used or referenced by other objects. I put them (the polymorphic objects) in MIC. And if one changes its type (not only its value), its users know it automatically by shared_ptr. I think I need MIC with shared_ptr pointing to scoped_ptr. Am I right? Or is there other way to easy handle it? Thanks a lot.
On Tuesday, December 20, 2011 2:54 PM, Jayden Shui wrote:There should be no need for both pointer types. Shared_ptr handles
>
> It is just my guess. In fact I need MIC with shared_ptr to a
> scoped_ptr. The shared_ptr is used to count number of uses,
> while the scoped_ptr used to handle polymorphic objects. I
> feel a little nervous with that.
polymorphic objects just fine.
A MIC holding shared_ptrs to your base class should do what you need,
and the overhead associated with the shared_ptr should be negligible.
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users