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

Fixed memory leak

This commit is contained in:
Christoph M. Wintersteiger 2015-01-22 18:43:23 +00:00
parent c3ff342bea
commit 034e4f469e
2 changed files with 6 additions and 5 deletions

View file

@ -146,14 +146,12 @@ public:
bool sgn(mpf const & x) const { return x.sign; }
const mpz & sig(mpf const & x) const { return x.significand; }
mpz sig_normalized(mpf const & x) {
void sig_normalized(mpf const & x, mpz & res) {
mpf t;
set(t, x);
unpack(t, true);
mpz r;
mpz_manager().set(r, t.significand);
mpz_manager().set(res, t.significand);
del(t);
return r;
}
const mpf_exp_t & exp(mpf const & x) const { return x.exponent; }
mpf_exp_t exp_normalized(mpf const & x) {