From: jpr Date: Tue, 30 Aug 2005 15:34:35 +0000 (+0000) Subject: Closing the file even when something wrong happens should avoid some memory X-Git-Tag: Version1.2.bp~164 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=068237f611af16f971febdf7a1eeb09adaa90d27;p=gdcm.git Closing the file even when something wrong happens should avoid some memory leaks. Thx to Benoit for reporting bug. --- diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index 5f40b723..557eb4e6 100644 --- a/src/gdcmDocument.cxx +++ b/src/gdcmDocument.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.cxx,v $ Language: C++ - Date: $Date: 2005/08/30 15:13:09 $ - Version: $Revision: 1.273 $ + Date: $Date: 2005/08/30 15:34:35 $ + Version: $Revision: 1.274 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -95,8 +95,7 @@ Document::Document( std::string const &fileName ) */ Document::~Document () { - RefPubDict = NULL; - RefShaDict = NULL; + CloseFile(); } //-----------------------------------------------------------------------------