3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 10:55: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:
Nikolaj Bjorner 2016-07-13 22:26:21 -07:00
parent f30fb7639e
commit b080e3a216
25 changed files with 115 additions and 56 deletions

View file

@ -35,6 +35,7 @@ Revision History:
#include"tactic_manager.h"
#include"context_params.h"
#include"api_polynomial.h"
#include"hashtable.h"
namespace smtlib {
class parser;
@ -69,6 +70,8 @@ namespace api {
ast_ref_vector m_ast_trail; //!< used when m_user_ref_count == false
ref<api::object> m_last_obj; //!< reference to the last API object returned by the APIs
u_map<api::object*> m_allocated_objects; // !< table containing current set of allocated API objects
unsigned_vector m_free_object_ids; // !< free list of identifiers available for allocated objects.
family_id m_basic_fid;
family_id m_array_fid;
@ -141,6 +144,9 @@ namespace api {
// Sign an error if solver is searching
void check_searching();
unsigned add_object(api::object* o);
void del_object(api::object* o);
Z3_ast_print_mode get_print_mode() const { return m_print_mode; }
void set_print_mode(Z3_ast_print_mode m) { m_print_mode = m; }