Bug #1082
openPossible memory leak in DcmDataset copy constructor
0%
Description
The DCMTK forum post https://forum.dcmtk.org/viewtopic.php?f=5&t=5292 reports that a call to std::make_shared<DcmDataset>(*dataset) causes a memory leak.
In this code, std::make_shared<> will call the copy constructor for DcmDataset, which in turn calls the copy constructor for DcmItem.
We should determine if this is a general problem (i.e. a leak in the copy constructor), or an issue caused by std::make_shared.
Updated by Jörg Riesmeier about 1 month ago
- Assignee set to Harald Roesen
- Target version set to 3.7.1
Updated by Harald Roesen 18 days ago
- Status changed from New to Resolved
The example code given at https://forum.dcmtk.org/viewtopic.php?p=21813&sid=3600048928a3e7a38dc572191c13a3d6#p21813 showed no leaks under Linux/Valgrind. Due to the OP's comment "The leaks might only occur on the Windows platform" above code was executed under Windows 11/heob (https://github.com/ssbssa/heob). This reveleved a number of (potential) issues. The combination Windows 11/Deleaker (https://www.softanics.com/deleaker) and code inspection(s) voided these as false positives.
Setting this entry to "Resolved".