Use std::shared_ptr to deallocate partialSolns automatically

This commit is contained in:
Jack Grigg
2016-07-23 00:31:47 +12:00
parent 1655db285d
commit 215b9e139d
2 changed files with 15 additions and 25 deletions

View File

@@ -14,6 +14,7 @@
#include <cstring>
#include <exception>
#include <functional>
#include <memory>
#include <set>
#include <vector>
@@ -107,7 +108,7 @@ public:
TruncatedStepRow& operator=(const TruncatedStepRow<WIDTH>& a);
inline bool IndicesBefore(const TruncatedStepRow<WIDTH>& a, size_t len, size_t lenIndices) const { return memcmp(hash+len, a.hash+len, lenIndices) < 0; }
eh_trunc* GetTruncatedIndices(size_t len, size_t lenIndices) const;
std::shared_ptr<eh_trunc> GetTruncatedIndices(size_t len, size_t lenIndices) const;
};
enum EhSolverCancelCheck