Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preamble mem leak was fixed #162

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Source/DataStructureAndEncodingDefinition/gdcmPreamble.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ class GDCM_EXPORT Preamble
}
Preamble& operator=(Preamble const &)
{
Internal = nullptr;
Create();
return *this;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we also copy characters from Internal?

Copy link
Contributor Author

@MadVitaliy MadVitaliy Oct 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To follow the current logic, we should not. Both copy operator and copy assign operator do not actually copy any data but fill allocated memory in some curtain fixed way. Moreover, these operators do not have an explicit input object.

Thus, let's wait for author's response.

Anyway, it not a big deal to add true copying, if it will be needed.

}
Expand Down