3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00
memory leaks
This commit is contained in:
Nikolaj Bjorner 2021-05-19 12:42:38 -07:00
parent abe3ef2382
commit ec034679ce
7 changed files with 26 additions and 18 deletions

View file

@ -46,16 +46,14 @@ extern "C" {
gparams::reset();
env_params::updt_params();
}
static std::string g_Z3_global_param_get_buffer;
Z3_bool_opt Z3_API Z3_global_param_get(Z3_string param_id, Z3_string_ptr param_value) {
memory::initialize(UINT_MAX);
LOG_Z3_global_param_get(param_id, param_value);
*param_value = nullptr;
try {
g_Z3_global_param_get_buffer = gparams::get_value(param_id);
*param_value = g_Z3_global_param_get_buffer.c_str();
gparams::g_buffer() = gparams::get_value(param_id);
*param_value = gparams::g_buffer().c_str();
return true;
}
catch (z3_exception & ex) {