3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-18 02:16:40 +00:00

remove a few unneded mem allocations

This commit is contained in:
Nuno Lopes 2017-11-06 10:36:10 +00:00
parent 0f2b1ae7c8
commit 861a0745c1
5 changed files with 17 additions and 15 deletions

View file

@ -399,8 +399,8 @@ void bv_size_reduction_tactic::operator()(goal_ref const & g,
void bv_size_reduction_tactic::cleanup() {
imp * d = alloc(imp, m_imp->m);
std::swap(d, m_imp);
dealloc(d);
ast_manager & m = m_imp->m;
m_imp->~imp();
new (m_imp) imp(m);
}

View file

@ -307,9 +307,10 @@ public:
}
virtual void cleanup() {
imp * d = alloc(imp, m_imp->m(), m_params);
std::swap(d, m_imp);
dealloc(d);
ast_manager & m = m_imp->m();
params_ref p = std::move(m_params);
m_imp->~imp();
new (m_imp) imp(m, p);
}
};