]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
destructor added
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 31 May 2001 06:19:22 +0000 (06:19 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 31 May 2001 06:19:22 +0000 (06:19 +0000)
git-svn-id: https://svn.dealii.org/trunk@4736 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/vector2d.h

index eb249eb1aaf628805c43b788e5ed3d9c7fbdd2f1..53c270e538ef6c06c4b5db75bfacb174ccfb3f0e 100644 (file)
@@ -75,6 +75,11 @@ class vector2d : public Subscriptor
                                    */
     vector2d<T>& operator = (const vector2d<T>& src);
 
+                                  /**
+                                   * Destructor. Free allocated memory.
+                                   */
+  ~vector2d ();
+  
                                   /**
                                    * Assignment operator.
                                    * Copy all elements of @p{src}
@@ -212,6 +217,15 @@ class vector2d : public Subscriptor
 };
 
 
+template <typename T>
+inline
+vector2d<T>::~vector2d ()
+{
+  if (val != 0)
+    delete[] val;
+};
+
+
 template <typename T>
 inline
 void

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.