Bugfix for SmtEngine: proper unsubscribing for NodeManager events
authorMorgan Deters <mdeters@cs.nyu.edu>
Tue, 5 Mar 2013 00:58:09 +0000 (19:58 -0500)
committerMorgan Deters <mdeters@cs.nyu.edu>
Tue, 5 Mar 2013 17:49:52 +0000 (12:49 -0500)
src/smt/smt_engine.cpp

index 09fed4f9fe3258ba28f6d14ff9802e39467c52c2..af02c518676c884b8b329e9a2a56324fa419e863 100644 (file)
@@ -365,6 +365,10 @@ public:
     d_smt.d_nodeManager->subscribeEvents(this);
   }
 
+  ~SmtEnginePrivate() {
+    d_smt.d_nodeManager->unsubscribeEvents(this);
+  }
+
   void nmNotifyNewSort(TypeNode tn) {
     DeclareTypeCommand c(tn.getAttribute(expr::VarNameAttr()),
                          0,