]> Creatis software - gdcm.git/blobdiff - src/gdcmFile.cxx
* Add a RefCounter object that is deleted only when it's reference count is
[gdcm.git] / src / gdcmFile.cxx
index 95a51268bcf8845d491ad62902790b867b4f8a54..88986f539279d14b3a622de674fde247a40d9515 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/19 19:36:54 $
-  Version:   $Revision: 1.283 $
+  Date:      $Date: 2005/10/20 15:24:09 $
+  Version:   $Revision: 1.284 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -230,10 +230,11 @@ bool File::DoTheLoadingJob( )
          // Change only made if usefull
          if ( PixelVR != oldEntry->GetVR() )
          {
-            DictEntry* newDict = NewVirtualDictEntry(GrPixel,NumPixel,
-                                                     PixelVR,"1","Pixel Data");
+            DictEntry* newDict = DictEntry::New(GrPixel,NumPixel,
+                                                PixelVR,"1","Pixel Data");
 
             DataEntry *newEntry = new DataEntry(newDict);
+            newDict->Delete();
             newEntry->Copy(entry);
             newEntry->SetBinArea(oldEntry->GetBinArea(),oldEntry->IsSelfArea());
             oldEntry->SetSelfArea(false);