Project

General

Profile

Actions

Bug #1082

open

Possible memory leak in DcmDataset copy constructor

Added by Marco Eichelberg almost 3 years ago. Updated 18 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Library
Target version:
Start date:
2023-08-10
Due date:
% Done:

0%

Estimated time:
Module:
dcmdata
Operating System:
Compiler:

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.

Actions #1

Updated by Jörg Riesmeier about 1 month ago

  • Assignee set to Harald Roesen
  • Target version set to 3.7.1
Actions #2

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".

Actions

Also available in: Atom PDF