]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add missing destructor
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Thu, 29 Sep 2005 12:47:41 +0000 (12:47 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Thu, 29 Sep 2005 12:47:41 +0000 (12:47 +0000)
git-svn-id: https://svn.dealii.org/trunk@11554 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/matrix_lib.h
deal.II/lac/include/lac/matrix_lib.templates.h

index 4d99d5f642cb61a01045290e3a71f02d1d9f33b3..a3da23c287652f6b634b80f8d27812a8b1cff788 100644 (file)
@@ -324,6 +324,11 @@ class InverseMatrixRichardson
                                      */
     InverseMatrixRichardson (SolverControl& control,
                             VectorMemory<VECTOR>& mem);
+                                    /**
+                                     * Since we use two pointers, we
+                                     * must implement a destructor.
+                                     */
+    ~InverseMatrixRichardson();
     
                                     /**
                                      * Initialization
index 9f4a1f3eaaceb18693aa87c994072f295a5eec53..bf3b1eb15c7fb55915f1808bbb0ebec9fbf50592 100644 (file)
@@ -132,6 +132,12 @@ InverseMatrixRichardson<VECTOR>::InverseMatrixRichardson(
 {}
 
 
+template <class VECTOR>
+InverseMatrixRichardson<VECTOR>::~InverseMatrixRichardson()
+{
+  if (matrix != 0) delete matrix;
+  if (precondition != 0) delete precondition;
+}
 
 
 template <class VECTOR>

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.