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

Fix memory leak with RAII wrappers #4

Merged
merged 3 commits into from
Jan 12, 2023
Merged

Fix memory leak with RAII wrappers #4

merged 3 commits into from
Jan 12, 2023

Conversation

alesapin
Copy link
Member

Just use unique_ptr where possible...

XmlReader& XmlReader::operator=(XmlReader&& other) noexcept
{
m_context = std::move(other.m_context);
m_context.reset();
Copy link
Member

Choose a reason for hiding this comment

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

Why is m_context reset right after the assignment? Do you mean other.m_context.reset()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants