diff --git a/libs/pbd/pbd/destructible.h b/libs/pbd/pbd/destructible.h index 778ea3738e..ee6c675ee8 100644 --- a/libs/pbd/pbd/destructible.h +++ b/libs/pbd/pbd/destructible.h @@ -30,7 +30,12 @@ public: PBD::Signal Destroyed; PBD::Signal DropReferences; - virtual void drop_references () { DropReferences(); } + virtual void drop_references () { DropReferences(); } + static void drop_and_kill (Destructible* d) { + assert (d); + d->DropReferences(); + delete d; + } }; }