MantisBT - ITK | ||||||||||
| View Issue Details | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||||
| 0007003 | ITK | public | 2008-05-13 01:34 | 2009-09-22 16:19 | ||||||
| Reporter | wen.feng.Qiu | |||||||||
| Assigned To | Mathieu Malaterre | |||||||||
| Priority | normal | Severity | block | Reproducibility | sometimes | |||||
| Status | closed | Resolution | fixed | |||||||
| Platform | OS | OS Version | ||||||||
| Product Version | ||||||||||
| Target Version | Fixed in Version | |||||||||
| Resolution Date | ||||||||||
| Sprint | ||||||||||
| Sprint Status | ||||||||||
| Summary | 0007003: ITK Memory leak in gdcm::gdcmdocument.h , function ParseDES, invoke RemoveEntry, and the solved method | |||||||||
| Description | When use gdcm::File to load DICOM , there will memory leak . Through track the invoke-list, i found that "ParseDES" invoke the function "RemoveEntry", but this function couldn't delete correctly. The originally "RemoveEntry", and i add the statement to solve this program. bool ElementSet::RemoveEntry( DocEntry *entryToRemove) { const TagKey &key = entryToRemove->GetKey(); if ( TagHT.count(key) == 1 ) { TagHT.erase(key); delete entryToRemove; return true; } gdcmWarningMacro( "Key not present : " << key); return false ; } After modify, bool ElementSet::RemoveEntry( DocEntry *entryToRemove) { const TagKey &key = entryToRemove->GetKey(); if ( TagHT.count(key) == 1 ) { TagHT.erase(key); delete entryToRemove; return true; } // summit add: to RemoveEntry delete correctly the entryToRemove delete entryToRemove; gdcmWarningMacro( "Key not present : " << key); return false ; } | |||||||||
| Steps To Reproduce | ||||||||||
| Additional Information | ||||||||||
| Tags | No tags attached. | |||||||||
| Relationships |
| |||||||||
| Attached Files | https://public.kitware.com/Bug/file/1456/gdcmDocEntry.cxx | |||||||||
| Issue History | ||||||||||
| Date Modified | Username | Field | Change | |||||||
| 2008-05-13 01:34 | wen.feng.Qiu | New Issue | ||||||||
| 2008-05-13 01:34 | wen.feng.Qiu | File Added: gdcmDocEntry.cxx | ||||||||
| 2008-10-06 05:33 | Mathieu Malaterre | Status | new => assigned | |||||||
| 2008-10-06 05:33 | Mathieu Malaterre | Assigned To | => Mathieu Malaterre | |||||||
| 2008-11-30 09:01 | Mathieu Malaterre | Relationship added | duplicate of 0007004 | |||||||
| 2008-11-30 09:01 | Mathieu Malaterre | Note Added: 0014238 | ||||||||
| 2008-11-30 09:01 | Mathieu Malaterre | Status | assigned => closed | |||||||
| 2008-11-30 09:01 | Mathieu Malaterre | Resolution | open => fixed | |||||||
| 2008-11-30 11:42 | Mathieu Malaterre | Status | closed => resolved | |||||||
| 2009-09-22 16:19 | Mathieu Malaterre | Status | resolved => closed | |||||||
| Notes | |||||
|
|
|||||
|
|
||||