Improve method of setting status_flags::dynallocated.
[ginac.git] / check / exam_factor.cpp
index bed95aa..754deea 100644 (file)
@@ -184,7 +184,7 @@ static unsigned exam_factor3()
 
 static unsigned check_factorization(const exvector& factors)
 {
-       ex e = (new mul(factors))->setflag(status_flags::dynallocated);
+       ex e = dynallocate<mul>(factors);
        ex ef = factor(e.expand());
        if (ef.nops() != factors.size()) {
                clog << "wrong number of factors, expected " << factors.size() <<