3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 18:31:49 +00:00

fix memleak

This commit is contained in:
Simon Cruanes 2017-12-25 22:48:37 +01:00
parent 35c802d869
commit f7e5977b9e
3 changed files with 8 additions and 1 deletions

View file

@ -342,6 +342,12 @@ namespace recfun {
m_plugin = dynamic_cast<decl::plugin*>(m.get_plugin(m_family_id));
}
util::~util() {
for (auto & kv : m_dlimit_map) {
dealloc(kv.m_value);
}
}
def * util::decl_fun(symbol const& name, unsigned n, sort *const * domain, sort * range) {
return alloc(def, m(), m_family_id, name, n, domain, range);
}

View file

@ -233,6 +233,7 @@ namespace recfun {
void set_definition(promise_def & d, unsigned n_vars, var * const * vars, expr * rhs);
public:
util(ast_manager &m, family_id);
virtual ~util();
ast_manager & m() { return m_manager; }
th_rewriter & get_th_rewriter() { return m_th_rw; }

View file

@ -62,7 +62,7 @@ namespace smt {
for (auto & kv : m_guards) {
m().dec_ref(kv.m_key);
}
m_guards.reset();
m_guards.reset();
}
char const * theory_recfun::get_name() const { return "recfun"; }