-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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: remove memory leak in avltree.cpp
#2429
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some work wrt comments pending.
Co-authored-by: David Leal <halfpacho@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. Thanks! 🚀
return nn; | ||
} | ||
|
||
/** Returns height of tree */ | ||
/** | ||
* @param[in] root the root of the tree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description "root the root of the tree" looks bizarre.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After rendering it is not so bad.
16024c0
Will be merging for now. If there are any objections/things to change, feel free to create another PR. 🙂 |
Description of Change
This PR removes a memory leak in
avltree.cpp
. Two things were done:root == nullptr
,deleteAllNodes
.Checklist
Notes:
Quick fix of a memory leak in
avltree.cpp
.