Merge branch 'master' into audioengine
[ardour.git] / libs / pbd / pbd / destructible.h
index 827feb8fe5e759050800ea2ca324d726a52c29de..8881b45c55116d9f6523d06e6a997c68c780a6ac 100644 (file)
 #ifndef __pbd_destructible_h__
 #define __pbd_destructible_h__
 
-#include <sigc++/signal.h>
+#include "pbd/signals.h"
 
 namespace PBD {
 
-/* 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 {
+class Destructible {
   public:
-       virtual ~Destructible () {}
-       void drop_references () const { GoingAway(); }
+        Destructible() {}
+       virtual ~Destructible () { Destroyed(); }
+       
+       PBD::Signal0<void> Destroyed;
+       PBD::Signal0<void> DropReferences;
 
+       void drop_references () { DropReferences();  }
 };
 
 }