|
Boost Users : |
From: David Abrahams (yg-boost-users_at_[hidden])
Date: 2002-10-01 05:47:35
"Petr Ferschmann" <petr_at_[hidden]> wrote in message
news:200210011039.42899_at_elara.ferschmann.cz...
> 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_at_[hidden] * http://www.boost-consulting.com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net