about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
-rw-r--r--include/klee/Solver/IncompleteSolver.h7
-rw-r--r--lib/Solver/IncompleteSolver.cpp5
2 files changed, 4 insertions, 8 deletions
diff --git a/include/klee/Solver/IncompleteSolver.h b/include/klee/Solver/IncompleteSolver.h
index 3841c38b..b8ef1929 100644
--- a/include/klee/Solver/IncompleteSolver.h
+++ b/include/klee/Solver/IncompleteSolver.h
@@ -13,6 +13,8 @@
 #include "klee/Solver/Solver.h"
 #include "klee/Solver/SolverImpl.h"
 
+#include <memory>
+
 namespace klee {
 
 /// IncompleteSolver - Base class for incomplete solver
@@ -87,12 +89,11 @@ public:
 /// solver.
 class StagedSolverImpl : public SolverImpl {
 private:
-  IncompleteSolver *primary;
-  Solver *secondary;
+  std::unique_ptr<IncompleteSolver> primary;
+  std::unique_ptr<Solver> secondary;
   
 public:
   StagedSolverImpl(IncompleteSolver *_primary, Solver *_secondary);
-  ~StagedSolverImpl();
     
   bool computeTruth(const Query&, bool &isValid);
   bool computeValidity(const Query&, Solver::Validity &result);
diff --git a/lib/Solver/IncompleteSolver.cpp b/lib/Solver/IncompleteSolver.cpp
index 9b57bc6c..a9035eda 100644
--- a/lib/Solver/IncompleteSolver.cpp
+++ b/lib/Solver/IncompleteSolver.cpp
@@ -64,11 +64,6 @@ StagedSolverImpl::StagedSolverImpl(IncompleteSolver *_primary,
     secondary(_secondary) {
 }
 
-StagedSolverImpl::~StagedSolverImpl() {
-  delete primary;
-  delete secondary;
-}
-
 bool StagedSolverImpl::computeTruth(const Query& query, bool &isValid) {
   IncompleteSolver::PartialValidity trueResult = primary->computeTruth(query);