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

Avoid memory leaks in MemWatchModel::clearRoot(). #142

Merged
merged 3 commits into from
May 17, 2024

Conversation

cristian64
Copy link
Collaborator

  • MemWatchModel::clearAllChild() has been renamed to MemWatchModel::removeChildren().
  • MemWatchModel::deleteChildren() has been added. Unlike removeChildren(), this new method does free the memory of the removed children.
  • The new method is now used in MemWatchModel::clearRoot(), which would previously only remove children but without deleting them.

…veChildren()`.

This method did not (and still does not) delete the memory of the
removed children; it merely removes the children from the parent's child
list. This behavior matches the `removeChild(int)` method, which does
not free the memory of the removed child either.
Unlike `removeChildren()` (previously `clearAllChild()`), this method
does free the memory of the removed children.
The method would previously remove children, but without deleting them.
@dreamsyntax dreamsyntax merged commit d0abec0 into aldelaro5:master May 17, 2024
4 checks passed
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