From: malaterre Date: Wed, 15 Sep 2004 03:50:48 +0000 (+0000) Subject: Very cautiously put gdcmDocentry destr as virtual, to prevent mem leak...well in... X-Git-Tag: Version0.6.bp~201 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=6b3b6fc84c343f66b656c619deddcf6dc5912e90;p=gdcm.git Very cautiously put gdcmDocentry destr as virtual, to prevent mem leak...well in theory since I had to comment inherited destructor. Sorry this was necessary --- diff --git a/src/gdcmBinEntry.cxx b/src/gdcmBinEntry.cxx index a010ff72..7f1217a1 100644 --- a/src/gdcmBinEntry.cxx +++ b/src/gdcmBinEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmBinEntry.cxx,v $ Language: C++ - Date: $Date: 2004/09/13 12:10:53 $ - Version: $Revision: 1.26 $ + Date: $Date: 2004/09/15 03:50:48 $ + Version: $Revision: 1.27 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -55,7 +55,7 @@ gdcmBinEntry::~gdcmBinEntry() { if (VoidArea) { - free (VoidArea); + //free (VoidArea); VoidArea = 0; // let's be carefull ! } } diff --git a/src/gdcmDocEntry.h b/src/gdcmDocEntry.h index 734a9f83..7253dcb0 100644 --- a/src/gdcmDocEntry.h +++ b/src/gdcmDocEntry.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntry.h,v $ Language: C++ - Date: $Date: 2004/09/13 12:10:53 $ - Version: $Revision: 1.20 $ + Date: $Date: 2004/09/15 03:50:48 $ + Version: $Revision: 1.21 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -39,6 +39,7 @@ class GDCM_EXPORT gdcmDocEntry { public: gdcmDocEntry(gdcmDictEntry*); + virtual ~gdcmDocEntry() {}; /// Returns the Dicom Group number of the current Dicom Header Entry uint16_t GetGroup() { return DictEntry->GetGroup(); }; diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index 54787ed8..4f066856 100644 --- a/src/gdcmDocument.cxx +++ b/src/gdcmDocument.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.cxx,v $ Language: C++ - Date: $Date: 2004/09/14 16:47:08 $ - Version: $Revision: 1.77 $ + Date: $Date: 2004/09/15 03:50:48 $ + Version: $Revision: 1.78 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -201,7 +201,7 @@ gdcmDocument::~gdcmDocument () for (TagDocEntryHT::const_iterator it = TagHT.begin(); it != TagHT.end(); ++it ) { - delete it->second; + //delete it->second; //temp remove } TagHT.clear(); }