3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-08 04:01:22 +00:00

micro-optimization in tactics' cleanup(): avoid dealloc+alloc traffic

This commit is contained in:
Nuno Lopes 2017-08-14 20:12:00 +01:00
parent 632c2d8ebf
commit 000796c25c
3 changed files with 7 additions and 10 deletions

View file

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