revert RCU changes back to union-based solution to fix strict-aliasing; another ...
[ardour.git] / libs / pbd / pbd / destructible.h
index 126bd04bba4c8d887951a7bcdea0190cd77caf51..7c5080633489dd7ce2050dc25d99d39aea2d4ea9 100644 (file)
@@ -5,14 +5,22 @@
 
 namespace PBD {
 
-class Destructible {
-  public:
-       Destructible() {}
-       virtual ~Destructible () {}
+/* be very very careful using this class. it does not inherit from sigc::trackable and thus
+   should only be used in multiple-inheritance situations involving another type
+   that does inherit from sigc::trackable (or sigc::trackable itself)
+*/
 
+class ThingWithGoingAway {
+  public:
+       virtual ~ThingWithGoingAway () {}
        sigc::signal<void> GoingAway;
+};
 
+class Destructible : public sigc::trackable, public ThingWithGoingAway {
+  public:
+       virtual ~Destructible () {}
        void drop_references () const { GoingAway(); }
+
 };
 
 }