]> Creatis software - gdcm.git/commitdiff
Closing the file even when something wrong happens should avoid some memory
authorjpr <jpr>
Tue, 30 Aug 2005 15:34:35 +0000 (15:34 +0000)
committerjpr <jpr>
Tue, 30 Aug 2005 15:34:35 +0000 (15:34 +0000)
leaks.
Thx to Benoit for reporting bug.

src/gdcmDocument.cxx

index 5f40b723e6d3ed4d141162ca360b947af9b3d0b0..557eb4e6b6a8ee1d20e998d485cc7fc0857c3823 100644 (file)
@@ -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();
 }
 
 //-----------------------------------------------------------------------------