From: wolf Date: Thu, 10 Feb 2000 13:58:38 +0000 (+0000) Subject: Add a destructor, to avoid a memory leak. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b6a071ac7016ed41eae26f7fea967bbbdbaefd6;p=dealii-svn.git Add a destructor, to avoid a memory leak. git-svn-id: https://svn.dealii.org/trunk@2366 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/Attic/examples/error-estimation/error-estimation.cc b/deal.II/deal.II/Attic/examples/error-estimation/error-estimation.cc index 80648997e3..cd11fc8630 100644 --- a/deal.II/deal.II/Attic/examples/error-estimation/error-estimation.cc +++ b/deal.II/deal.II/Attic/examples/error-estimation/error-estimation.cc @@ -82,6 +82,7 @@ class PoissonProblem : public ProblemBase, public MultipleParameterLoop::Us }; PoissonProblem (); + ~PoissonProblem (); void clear (); void create_new (const unsigned int); @@ -337,6 +338,13 @@ PoissonProblem::PoissonProblem () : +template +PoissonProblem::~PoissonProblem () +{ + clear (); +}; + + template void PoissonProblem::clear () { diff --git a/tests/big-tests/error-estimation/error-estimation.cc b/tests/big-tests/error-estimation/error-estimation.cc index 80648997e3..cd11fc8630 100644 --- a/tests/big-tests/error-estimation/error-estimation.cc +++ b/tests/big-tests/error-estimation/error-estimation.cc @@ -82,6 +82,7 @@ class PoissonProblem : public ProblemBase, public MultipleParameterLoop::Us }; PoissonProblem (); + ~PoissonProblem (); void clear (); void create_new (const unsigned int); @@ -337,6 +338,13 @@ PoissonProblem::PoissonProblem () : +template +PoissonProblem::~PoissonProblem () +{ + clear (); +}; + + template void PoissonProblem::clear () {