Skip to content

Commit 910b302

Browse files
free memory the clean way
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
1 parent d32dcfc commit 910b302

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/math/polynomial/algebraic_numbers.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ namespace algebraic_numbers {
180180
return m_upmanager;
181181
}
182182

183-
void del(basic_cell * c) {
183+
void del_basic(basic_cell * c) {
184184
qm().del(c->m_value);
185185
m_allocator.deallocate(sizeof(basic_cell), c);
186186
}
@@ -207,7 +207,7 @@ namespace algebraic_numbers {
207207
if (a.is_null())
208208
return;
209209
if (a.is_basic())
210-
del(a.to_basic());
210+
del_basic(a.to_basic());
211211
else
212212
del(a.to_algebraic());
213213
a.clear();
@@ -795,7 +795,7 @@ namespace algebraic_numbers {
795795
// root was found
796796
scoped_mpq r(qm());
797797
to_mpq(qm(), lower(c), r);
798-
del(c);
798+
del(a);
799799
a = mk_basic_cell(r);
800800
return false;
801801
}

0 commit comments

Comments
 (0)