We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5550e4 commit b571e43Copy full SHA for b571e43
src/math/polynomial/polynomial.cpp
@@ -794,11 +794,15 @@ namespace polynomial {
794
~monomial_manager() {
795
dec_ref(m_unit);
796
CTRACE("polynomial", !m_monomials.empty(),
797
- tout << "monomials leaked\n";
+ tout << "monomials leaked (can happen during cancelation)\n";
798
for (auto * m : m_monomials) {
799
m->display(tout << m->id() << " " << m->ref_count() << " ") << "\n";
800
});
801
- SASSERT(m_monomials.empty());
+ for (monomial* m : m_monomials) {
802
+ unsigned obj_sz = monomial::get_obj_size(m->size());
803
+ m_allocator->deallocate(obj_sz, m);
804
+ }
805
+ m_monomials.reset();
806
if (m_own_allocator)
807
dealloc(m_allocator);
808
}
0 commit comments