X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fpbd%2Fpbd%2Fdestructible.h;h=8881b45c55116d9f6523d06e6a997c68c780a6ac;hb=7a6e86c9f9bef8db74b755db659794c4a859f36d;hp=8cc0113ff7f714a50341a495a0d4848725b0ef24;hpb=aae367b63c9b619db1e40f27dc334c6987219481;p=ardour.git diff --git a/libs/pbd/pbd/destructible.h b/libs/pbd/pbd/destructible.h index 8cc0113ff7..8881b45c55 100644 --- a/libs/pbd/pbd/destructible.h +++ b/libs/pbd/pbd/destructible.h @@ -26,14 +26,13 @@ namespace PBD { class Destructible { public: - Destructible() : refs_dropped (false){} - virtual ~Destructible () {} + Destructible() {} + virtual ~Destructible () { Destroyed(); } - PBD::Signal0 GoingAway; - void drop_references () { if (!refs_dropped) { GoingAway(); } refs_dropped = true; } + PBD::Signal0 Destroyed; + PBD::Signal0 DropReferences; - private: - bool refs_dropped; + void drop_references () { DropReferences(); } }; }