From c2618903ae3caeca04033dfc5603886b8b934d8c Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 5 Aug 2020 22:16:33 +0200 Subject: [PATCH] Allow to overload drop_references() This is useful in cases where an object owns child objects which in turn hold a reference to the parent. In this case PluginInsert has-a Plugin, which may have a reference to the insert or the Route. --- libs/pbd/pbd/destructible.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/pbd/pbd/destructible.h b/libs/pbd/pbd/destructible.h index 05d7b14a03..8acbed05e2 100644 --- a/libs/pbd/pbd/destructible.h +++ b/libs/pbd/pbd/destructible.h @@ -32,7 +32,7 @@ class LIBPBD_API Destructible { PBD::Signal0 Destroyed; PBD::Signal0 DropReferences; - void drop_references () { DropReferences(); } + virtual void drop_references () { DropReferences(); } }; }