Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2004/11/05 20:23:14 $
- Version: $Revision: 1.117 $
+ Date: $Date: 2004/11/05 21:23:46 $
+ Version: $Revision: 1.118 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//delete it->second; //temp remove
}
TagHT.clear();
+ delete RLEInfo;
+ delete JPEGInfo;
}
//-----------------------------------------------------------------------------
{
std::string ts =
Util::DicomString( TransferSyntaxStrings[ExplicitVRLittleEndian] );
- ReplaceOrCreateByNumber(ts, 0x0002, 0x0010);
+ ReplaceOrCreateByNumber(ts, 0x0002, 0x0010); //LEAK
/// \todo Refer to standards on page 21, chapter 6.2
/// "Value representation": values with a VR of UI shall be
valEntry = new ValEntry(currentEntry);
if ( !AddEntry(valEntry))
{
+ delete valEntry;
dbg.Verbose(0, "Document::ReplaceOrCreateByNumber: AddEntry"
" failed allthough this is a creation.");
}
+ // This is the reason why NewDocEntryByNumber are a real
+ // bad habit !!! FIXME
+ delete currentEntry;
}
else
{
valEntry = new ValEntry(currentEntry);
if (!RemoveEntry(currentEntry))
{
+ delete valEntry;
dbg.Verbose(0, "Document::ReplaceOrCreateByNumber: removal"
" of previous DocEntry failed.");
return NULL;
}
if ( !AddEntry(valEntry))
{
+ delete valEntry;
dbg.Verbose(0, "Document::ReplaceOrCreateByNumber: adding"
" promoted ValEntry failed.");
return NULL;
//////////////////// BinEntry or UNKOWN VR:
BinEntry* newBinEntry =
- new BinEntry( newDocEntry->GetDictEntry() );
+ new BinEntry( newDocEntry->GetDictEntry() ); //LEAK
newBinEntry->Copy( newDocEntry );
// When "this" is a Document the Key is simply of the