mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 18:31:49 +00:00
fix memleak
This commit is contained in:
parent
35c802d869
commit
f7e5977b9e
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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"; }
|
||||
|
|
Loading…
Reference in a new issue