From: Alexander Schmidt Date: Wed, 27 Aug 2014 22:52:33 +0000 (+0200) Subject: Destructing prestore. X-Git-Url: http://git.treefish.org/~alex/phys/su2clebsch.git/commitdiff_plain/f186084682167eb2003c925afde80aee309cc99c Destructing prestore. --- diff --git a/su2clebsch.cpp b/su2clebsch.cpp index 11d506e..f809635 100644 --- a/su2clebsch.cpp +++ b/su2clebsch.cpp @@ -21,6 +21,11 @@ namespace su2clebsch { return result; } + prestore::~prestore () + { + delete[] cgcdata; + } + prestore::prestore(unsigned int _max2j) { max2j = _max2j; diff --git a/su2clebsch.hpp b/su2clebsch.hpp index 87e01bf..955868c 100644 --- a/su2clebsch.hpp +++ b/su2clebsch.hpp @@ -1,6 +1,8 @@ #ifndef SU2CLEBSCH_HPP #define SU2CLEBSCH_HPP +using namespace std; + namespace su2clebsch { struct prestore { @@ -9,6 +11,7 @@ namespace su2clebsch { double *cgcdata; public: prestore(unsigned int _max2j); + ~prestore(); friend double cgc (int factor1_2j, int factor1_2m, int factor2_2j, int factor2_2m, int irrep_2j, int irrep_2m, const prestore& Prestore);