6 Feb
2006
6 Feb
'06
2:13 p.m.
Suppose that class A that accepts a pointer to class B. An instance of A class can own the pointer or it can share it with some other A instances. The knowledge of whether or not the A instance should own the pointer is something that depends by the one that construct the instance. Shared_ptr seems as a good candidate for this problem but what if the pointer passed to the A instance might come from a legacy code that works with raw-pointers ? I think that a kind of scoped_ptr with a ownership flag will help here __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com