Hi,
I have created a Win32 console application with MFC support with
the following VC++ 6.0 setting:
1. Using MFC in a shared DLL
The follownig example code for making a Dicom file in the documentation/help is leaking memory when used with the Boundschecker.
_______________________________________________
char uid[100];
DcmFileFormat fileformat;
DcmDataset *dataset = fileformat.getDataset();
dataset->putAndInsertString(DCM_SOPClassUID, UID_SecondaryCaptureImageStorage);
dataset->putAndInsertString(DCM_SOPInstanceUID, dcmGenerateUniqueIdentifier(uid, SITE_INSTANCE_UID_ROOT));
dataset->putAndInsertString(DCM_PatientsName, "Doe^John");
OFCondition status = fileformat.saveFile("test.dcm", EXS_LittleEndianExplicit);
if (status.bad())
cerr << "Error: cannot write DICOM file (" << status.text() << ")" << endl;
__________________________________________________________
The error message is :
Memory allocation conflict
Allocated by malloc
Freed by operator delete
________________________________________________________
The occurs at the OFCondition status = fileformat.saveFile("test.dcm", EXS_LittleEndianExplicit); line.
Can anybody help me?
Thanks,
Chandra
Memory Leak
Moderator: Moderator Team
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest