mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 03:45:51 +00:00
remove a few unneded mem allocations
This commit is contained in:
parent
0f2b1ae7c8
commit
861a0745c1
5 changed files with 17 additions and 15 deletions
|
@ -255,8 +255,9 @@ public:
|
|||
|
||||
virtual void cleanup() {
|
||||
ast_manager & m = m_imp->m;
|
||||
dealloc(m_imp);
|
||||
m_imp = alloc(imp, m, m_params);
|
||||
params_ref p = std::move(m_params);
|
||||
m_imp->~imp();
|
||||
new (m_imp) imp(m, p);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -111,9 +111,9 @@ void simplify_tactic::operator()(goal_ref const & in,
|
|||
|
||||
void simplify_tactic::cleanup() {
|
||||
ast_manager & m = m_imp->m();
|
||||
imp * d = alloc(imp, m, m_params);
|
||||
std::swap(d, m_imp);
|
||||
dealloc(d);
|
||||
params_ref p = std::move(m_params);
|
||||
m_imp->~imp();
|
||||
new (m_imp) imp(m, p);
|
||||
}
|
||||
|
||||
unsigned simplify_tactic::get_num_steps() const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue