From 5f83f4451db5c17de022d87b5db593da46ae23aa Mon Sep 17 00:00:00 2001 From: TimQu Date: Wed, 19 Apr 2017 15:23:56 +0200 Subject: [PATCH] added a few virtual destructors to prevent memory leaks. --- .../multiobjective/pcaa/SparseMaPcaaWeightVectorChecker.h | 2 ++ .../multiobjective/pcaa/SparseMdpPcaaWeightVectorChecker.h | 4 +++- .../multiobjective/pcaa/SparsePcaaAchievabilityQuery.h | 3 ++- .../modelchecker/multiobjective/pcaa/SparsePcaaParetoQuery.h | 2 ++ .../multiobjective/pcaa/SparsePcaaQuantitativeQuery.h | 3 ++- src/storm/modelchecker/multiobjective/pcaa/SparsePcaaQuery.h | 2 ++ .../multiobjective/pcaa/SparsePcaaWeightVectorChecker.h | 2 ++ 7 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/storm/modelchecker/multiobjective/pcaa/SparseMaPcaaWeightVectorChecker.h b/src/storm/modelchecker/multiobjective/pcaa/SparseMaPcaaWeightVectorChecker.h index 1ac363c4d..827f1701e 100644 --- a/src/storm/modelchecker/multiobjective/pcaa/SparseMaPcaaWeightVectorChecker.h +++ b/src/storm/modelchecker/multiobjective/pcaa/SparseMaPcaaWeightVectorChecker.h @@ -31,6 +31,8 @@ namespace storm { storm::storage::BitVector const& ecActions, storm::storage::BitVector const& possiblyRecurrentStates); + virtual ~SparseMaPcaaWeightVectorChecker() = default; + private: /* diff --git a/src/storm/modelchecker/multiobjective/pcaa/SparseMdpPcaaWeightVectorChecker.h b/src/storm/modelchecker/multiobjective/pcaa/SparseMdpPcaaWeightVectorChecker.h index aa0425c4f..8b56386c9 100644 --- a/src/storm/modelchecker/multiobjective/pcaa/SparseMdpPcaaWeightVectorChecker.h +++ b/src/storm/modelchecker/multiobjective/pcaa/SparseMdpPcaaWeightVectorChecker.h @@ -25,7 +25,9 @@ namespace storm { storm::storage::BitVector const& actionsWithNegativeReward, storm::storage::BitVector const& ecActions, storm::storage::BitVector const& possiblyRecurrentStates); - + + virtual ~SparseMdpPcaaWeightVectorChecker() = default; + private: /*! diff --git a/src/storm/modelchecker/multiobjective/pcaa/SparsePcaaAchievabilityQuery.h b/src/storm/modelchecker/multiobjective/pcaa/SparsePcaaAchievabilityQuery.h index d4f3ea32b..c250f257b 100644 --- a/src/storm/modelchecker/multiobjective/pcaa/SparsePcaaAchievabilityQuery.h +++ b/src/storm/modelchecker/multiobjective/pcaa/SparsePcaaAchievabilityQuery.h @@ -25,7 +25,8 @@ namespace storm { */ SparsePcaaAchievabilityQuery(SparsePcaaPreprocessorReturnType& preprocessorResult); - + virtual ~SparsePcaaAchievabilityQuery() = default; + /* * Invokes the computation and retrieves the result */ diff --git a/src/storm/modelchecker/multiobjective/pcaa/SparsePcaaParetoQuery.h b/src/storm/modelchecker/multiobjective/pcaa/SparsePcaaParetoQuery.h index 08256f3c7..b6361faff 100644 --- a/src/storm/modelchecker/multiobjective/pcaa/SparsePcaaParetoQuery.h +++ b/src/storm/modelchecker/multiobjective/pcaa/SparsePcaaParetoQuery.h @@ -25,6 +25,8 @@ namespace storm { */ SparsePcaaParetoQuery(SparsePcaaPreprocessorReturnType& preprocessorResult); + virtual ~SparsePcaaParetoQuery() = default; + /* * Invokes the computation and retrieves the result diff --git a/src/storm/modelchecker/multiobjective/pcaa/SparsePcaaQuantitativeQuery.h b/src/storm/modelchecker/multiobjective/pcaa/SparsePcaaQuantitativeQuery.h index 3e72763f1..ca2d8c81a 100644 --- a/src/storm/modelchecker/multiobjective/pcaa/SparsePcaaQuantitativeQuery.h +++ b/src/storm/modelchecker/multiobjective/pcaa/SparsePcaaQuantitativeQuery.h @@ -25,7 +25,8 @@ namespace storm { */ SparsePcaaQuantitativeQuery(SparsePcaaPreprocessorReturnType& preprocessorResult); - + virtual ~SparsePcaaQuantitativeQuery() = default; + /* * Invokes the computation and retrieves the result */ diff --git a/src/storm/modelchecker/multiobjective/pcaa/SparsePcaaQuery.h b/src/storm/modelchecker/multiobjective/pcaa/SparsePcaaQuery.h index c0a891a13..e6404c9ac 100644 --- a/src/storm/modelchecker/multiobjective/pcaa/SparsePcaaQuery.h +++ b/src/storm/modelchecker/multiobjective/pcaa/SparsePcaaQuery.h @@ -22,6 +22,8 @@ namespace storm { typedef std::vector Point; typedef std::vector WeightVector; + virtual ~SparsePcaaQuery() = default; + /* * Invokes the computation and retrieves the result */ diff --git a/src/storm/modelchecker/multiobjective/pcaa/SparsePcaaWeightVectorChecker.h b/src/storm/modelchecker/multiobjective/pcaa/SparsePcaaWeightVectorChecker.h index 452f30189..d80eb4931 100644 --- a/src/storm/modelchecker/multiobjective/pcaa/SparsePcaaWeightVectorChecker.h +++ b/src/storm/modelchecker/multiobjective/pcaa/SparsePcaaWeightVectorChecker.h @@ -40,6 +40,8 @@ namespace storm { storm::storage::BitVector const& ecActions, storm::storage::BitVector const& possiblyRecurrentStates); + virtual ~SparsePcaaWeightVectorChecker() = default; + /*! * - computes the maximal expected reward w.r.t. the weighted sum of the rewards of the individual objectives * - extracts the scheduler that induces this maximum