From a757267b01482431075229ffe33d5e64cfc9fea2 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Thu, 31 May 2001 06:19:22 +0000 Subject: [PATCH] destructor added git-svn-id: https://svn.dealii.org/trunk@4736 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/vector2d.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/deal.II/base/include/base/vector2d.h b/deal.II/base/include/base/vector2d.h index eb249eb1aa..53c270e538 100644 --- a/deal.II/base/include/base/vector2d.h +++ b/deal.II/base/include/base/vector2d.h @@ -75,6 +75,11 @@ class vector2d : public Subscriptor */ vector2d& operator = (const vector2d& src); + /** + * Destructor. Free allocated memory. + */ + ~vector2d (); + /** * Assignment operator. * Copy all elements of @p{src} @@ -212,6 +217,15 @@ class vector2d : public Subscriptor }; +template +inline +vector2d::~vector2d () +{ + if (val != 0) + delete[] val; +}; + + template inline void -- 2.39.5