Fix minor memory leak.

This commit is contained in:
Atgeirr Flø Rasmussen 2015-08-17 15:44:58 +02:00
parent 8897e2bb46
commit c9b76880b6

View File

@ -97,7 +97,8 @@ namespace Opm
{
// Construct scalar product.
typedef Dune::ScalarProductChooser<Vector, POrComm, category> ScalarProductChooser;
auto sp = ScalarProductChooser::construct(parallelInformation);
typedef std::unique_ptr<typename ScalarProductChooser::ScalarProduct> SPPointer;
SPPointer sp(ScalarProductChooser::construct(parallelInformation));
// Construct preconditioner.
auto precond = constructPrecond(opA, parallelInformation);