3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

fix memory leak in scoped_numeral_vector

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2014-03-22 20:34:34 -07:00
parent 92145f2bfa
commit ea261c930d
2 changed files with 10 additions and 3 deletions

View file

@ -46,6 +46,10 @@ public:
m_manager.set(this->back(), v);
}
void pop_back() {
shrink(size()-1);
}
void shrink(unsigned sz) {
unsigned old_sz = this->size();
if (old_sz == sz)