
31 Jan
2006
31 Jan
'06
2:11 a.m.
Why does boost::shared_ptr have a public reset() method? Why is this method not private? In reading the introduction for weak_ptr, it seems like its main purpose is to cover up or control this opening to boost::shared_ptr. http://www.boost.org/libs/smart_ptr/weak_ptr.htm If boost::shared_ptr didn't have this type of public access, would there be a need for the weak_ptr? I can not find any example code that would justify the requirement for the weak_ptr other than the code in above link.