]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix memory leak.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 16 Feb 1999 11:54:51 +0000 (11:54 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 16 Feb 1999 11:54:51 +0000 (11:54 +0000)
git-svn-id: https://svn.dealii.org/trunk@808 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/Attic/examples/dof/dof_test.cc
tests/big-tests/dof/dof_test.cc

index 72b109e72eaa539aa477fb9d93b53c93f54a739b..7187fe1688cf2ba2082b0493c4ab100a3ece8675 100644 (file)
@@ -79,6 +79,7 @@ template <int dim>
 class TestCases : public MultipleParameterLoop::UserClass{
   public:
     TestCases ();
+    ~TestCases ();
     
     virtual void create_new (const unsigned int run_no);
     virtual void declare_parameters (ParameterHandler &prm);
@@ -96,6 +97,14 @@ TestCases<dim>::TestCases () :
                tria(0), dof(0) {};
 
 
+template <int dim>
+TestCases<dim>::~TestCases () 
+{
+  if (tria) delete tria;
+  if (dof)  delete dof;
+};
+
+
 
 template <int dim>
 void TestCases<dim>::create_new (const unsigned int) {
index 72b109e72eaa539aa477fb9d93b53c93f54a739b..7187fe1688cf2ba2082b0493c4ab100a3ece8675 100644 (file)
@@ -79,6 +79,7 @@ template <int dim>
 class TestCases : public MultipleParameterLoop::UserClass{
   public:
     TestCases ();
+    ~TestCases ();
     
     virtual void create_new (const unsigned int run_no);
     virtual void declare_parameters (ParameterHandler &prm);
@@ -96,6 +97,14 @@ TestCases<dim>::TestCases () :
                tria(0), dof(0) {};
 
 
+template <int dim>
+TestCases<dim>::~TestCases () 
+{
+  if (tria) delete tria;
+  if (dof)  delete dof;
+};
+
+
 
 template <int dim>
 void TestCases<dim>::create_new (const unsigned int) {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.