From: Wolfgang Bangerth Date: Thu, 10 Feb 2000 13:58:38 +0000 (+0000) Subject: Add a destructor, to avoid a memory leak. X-Git-Tag: v8.0.0~20994 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2dbf0ace7af197a7024d66547a81527f2daaaca2;p=dealii.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 () {