
3 Apr
2005
3 Apr
'05
12:30 a.m.
"Marcin KaliciƱski" wrote:
Smart pointers in boost work on a principle of preventing object destruction while references to it exist anywhere in the system. It causes that whoever owns a boost::shared_ptr to some object, has power to decide for how long will that object live. This is "ownership".
In some situations it would be more convenient if object itself decided when to die (owned itself?), and notified all reference holders about this fact, so that they not try to use it any more.
Could you compare it to smart_ptr/weak_ptr combination? /Pavel