Because it is not safe to have a pointer to something and not reference
count it.
Not sure what you mean here, I still have weak_ptr<> which has a counter
and there is a shared_ptr<> (or not) somewhere out there. So counter exists
as long as I still have any shared_ or weak_ pointer.
See the explanation at
http://www.boost.org/doc/libs/1_47_0/libs/smart_ptr/weak_ptr.htm for a more
detailed argument of the same.
Thanks, no idea how I missed that. Makes perfect sense in threaded world
but not convinced for single-threaded.
If you don't want safety in your pointers,
then use raw pointers. If you want safety, then you have to accept the
consequences...
So using get() on shared/scoped/auto/unique_ptr somehow keeps me safe
having raw pointer that bypasses all protection they provide but weak_ptr
is too much? Not buying it ;)
Cheers,
Simon
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users