From 64ef25e1cadb4b840a4cedfe0adaddecb2d7ca42 Mon Sep 17 00:00:00 2001 From: frog Date: Wed, 22 Sep 2004 21:01:55 +0000 Subject: [PATCH] * src/gdcmDocument.cxx: gdcmDocument::~gdcmDocument() doesn't clear (nor clear) TagHT, which is an inherited member of gdcmElementSet. It is up to the destructor of gdcmElementSet to clean up TagHt and it's pointed content. --- ChangeLog | 6 ++++++ src/gdcmDocument.cxx | 16 ++++------------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index c5f8b091..b825eda1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-09-22 Eric Boix + * src/gdcmDocument.cxx: gdcmDocument::~gdcmDocument() doesn't clear (nor + clear) TagHT, which is an inherited member of gdcmElementSet. It is + up to the destructor of gdcmElementSet to clean up TagHt and it's + pointed content. + 2004-09-21 Eric Boix * Test/CMakeLists.txt: update to follow gdcmData renamings. * src/gdcmCommon.h, gdcmDocument.cxx: doxygen typos diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index 954b5e40..c355fd4e 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/22 10:34:53 $ - Version: $Revision: 1.86 $ + Date: $Date: 2004/09/22 21:01:55 $ + Version: $Revision: 1.87 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -192,16 +192,8 @@ gdcmDocument::gdcmDocument() */ gdcmDocument::~gdcmDocument () { - RefPubDict = NULL; - RefShaDict = NULL; - - // Recursive clean up of sequences - for (TagDocEntryHT::const_iterator it = TagHT.begin(); - it != TagHT.end(); ++it ) - { - //delete it->second; //temp remove - } - TagHT.clear(); + RefPubDict = 0; + RefShaDict = 0; } //----------------------------------------------------------------------------- -- 2.48.1