
2 Sep
2009
2 Sep
'09
6:49 p.m.
Mateusz Loskot wrote:
Hi,
One of the smart pointer techniques [1] explains use of weak_ptr pointer to object not managed by a shared_ptr.
[1] http://www.boost.org/doc/libs/1_40_0/libs/smart_ptr/sp_techniques.html
I'm wondering what would be practical use case of that? Is it a part of any of known idioms or patterns?
FWIW the serialization library needed to use this to detect destruction of dependent objects whose destruction was handled automatically. I'm guessing this would qualify as a use case. Robert Ramey