3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-12 04:03:39 +00:00

fix finalize method

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2024-07-28 19:10:30 -07:00
parent ac7014a68b
commit 25e683e4e1

View file

@ -220,19 +220,17 @@ namespace datatype {
} }
namespace decl { namespace decl {
plugin::~plugin() { plugin::~plugin() {
finalize(); finalize();
} }
void plugin::finalize() { void plugin::finalize() {
for (auto& kv : m_defs) { for (auto& kv : m_defs)
dealloc(kv.m_value); dealloc(kv.m_value);
}
m_defs.reset(); m_defs.reset();
m_util = nullptr; // force deletion m_util = nullptr; // force deletion
dealloc(m_asts); reset();
std::for_each(m_vectors.begin(), m_vectors.end(), delete_proc<ptr_vector<func_decl> >());
} }
void plugin::reset() { void plugin::reset() {