Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2004/11/15 16:12:30 $
- Version: $Revision: 1.123 $
+ Date: $Date: 2004/11/16 02:54:35 $
+ Version: $Revision: 1.124 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
/////////////////////// ValEntry
ValEntry* newValEntry =
- new ValEntry( newDocEntry->GetDictEntry() );
+ new ValEntry( newDocEntry->GetDictEntry() ); //LEAK
newValEntry->Copy( newDocEntry );
// When "set" is a Document, then we are at the top of the
+ newValEntry->GetKey() );
}
- set->AddEntry( newValEntry );
+ if( !set->AddEntry( newValEntry ) )
+ {
+ // If here expect big troubles
+ delete newValEntry; //otherwise mem leak
+ }
LoadDocEntry( newValEntry );
if (newValEntry->IsItemDelimitor())
{
+ newBinEntry->GetKey() );
}
- set->AddEntry( newBinEntry );
+ if( !set->AddEntry( newBinEntry ) )
+ {
+ //Expect big troubles if here
+ delete newBinEntry;
+ }
LoadDocEntry( newBinEntry );
}
s << " x(" << std::hex << entry->GetLength() << ")";
binEntryPtr->SetValue(s.str());
}
- // Be carefull : a BinEntry IS_A ValEntry ...
+ // Be carefull : a BinEntry IS_A ValEntry ...
else if (ValEntry* valEntryPtr = dynamic_cast< ValEntry* >(entry) )
{
// s << "gdcm::NotLoaded. (ValEntry)";