mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 03:15:50 +00:00
garbage collect all api::object references when calling del_context. Request issue #679
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
f30fb7639e
commit
b080e3a216
25 changed files with 115 additions and 56 deletions
|
@ -32,7 +32,7 @@ extern "C" {
|
|||
SET_ERROR_CODE(Z3_INVALID_ARG);
|
||||
RETURN_Z3(0);
|
||||
}
|
||||
Z3_goal_ref * g = alloc(Z3_goal_ref);
|
||||
Z3_goal_ref * g = alloc(Z3_goal_ref, *mk_c(c));
|
||||
g->m_goal = alloc(goal, mk_c(c)->m(), proofs != 0, models != 0, unsat_cores != 0);
|
||||
mk_c(c)->save_object(g);
|
||||
Z3_goal r = of_goal(g);
|
||||
|
@ -156,7 +156,7 @@ extern "C" {
|
|||
LOG_Z3_goal_translate(c, g, target);
|
||||
RESET_ERROR_CODE();
|
||||
ast_translation translator(mk_c(c)->m(), mk_c(target)->m());
|
||||
Z3_goal_ref * _r = alloc(Z3_goal_ref);
|
||||
Z3_goal_ref * _r = alloc(Z3_goal_ref, *mk_c(c));
|
||||
_r->m_goal = to_goal_ref(g)->translate(translator);
|
||||
mk_c(target)->save_object(_r);
|
||||
Z3_goal r = of_goal(_r);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue