"Petr Ferschmann"
But in case of usage of intrusive pointer it doesn't call destructor - because there is weak pointer.
But when I undefine INTR and it uses non-intrusive it works as expected. This is only modelling case to simulate bug.
You can't call it a bug until there's documentation which tells you what you have a right to expect ;-) In this case, it's not a bug. You can implement the dispose() function on your class to throw away resources when the last shared_ptr reference goes away, but weak_ptr references still exist. -- ----------------------------------------------------------- David Abrahams * Boost Consulting dave@boost-consulting.com * http://www.boost-consulting.com