mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 12:08:18 +00:00
simplify ~context #1948
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
796689f708
commit
a3f9e3168d
|
@ -109,13 +109,10 @@ namespace api {
|
||||||
|
|
||||||
context::~context() {
|
context::~context() {
|
||||||
m_last_obj = nullptr;
|
m_last_obj = nullptr;
|
||||||
u_map<api::object*>::iterator it = m_allocated_objects.begin();
|
for (auto& kv : m_allocated_objects) {
|
||||||
while (it != m_allocated_objects.end()) {
|
api::object* val = kv.m_value;
|
||||||
api::object* val = it->m_value;
|
DEBUG_CODE(warning_msg("Uncollected memory: %d: %s", kv.m_key, typeid(*val).name()););
|
||||||
DEBUG_CODE(warning_msg("Uncollected memory: %d: %s", it->m_key, typeid(*val).name()););
|
|
||||||
m_allocated_objects.remove(it->m_key);
|
|
||||||
dealloc(val);
|
dealloc(val);
|
||||||
it = m_allocated_objects.begin();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue