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: remove memory leak in avltree.cpp #2429

Merged
merged 13 commits into from
Feb 4, 2023

Conversation

vil02
Copy link
Member

@vil02 vil02 commented Jan 27, 2023

Description of Change

This PR removes a memory leak in avltree.cpp. Two things were done:

Checklist

  • Added description of change
  • Added documentation so that the program is self-explanatory and educational - Doxygen guidelines
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes:
Quick fix of a memory leak in avltree.cpp.

@Panquesito7 Panquesito7 added the Improvement improvement in previously written codes label Jan 30, 2023
@vil02 vil02 requested a review from krishnacx January 30, 2023 20:53
data_structures/avltree.cpp Outdated Show resolved Hide resolved
data_structures/avltree.cpp Show resolved Hide resolved
Copy link

@krishnacx krishnacx left a 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.

data_structures/avltree.cpp Outdated Show resolved Hide resolved
data_structures/avltree.cpp Outdated Show resolved Hide resolved
data_structures/avltree.cpp Outdated Show resolved Hide resolved
data_structures/avltree.cpp Outdated Show resolved Hide resolved
@vil02 vil02 requested a review from Panquesito7 January 31, 2023 20:47
Panquesito7
Panquesito7 previously approved these changes Jan 31, 2023
Copy link
Member

@Panquesito7 Panquesito7 left a comment

Choose a reason for hiding this comment

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

Awesome. Thanks! 🚀

tjgurwara99
tjgurwara99 previously approved these changes Feb 1, 2023
return nn;
}

/** Returns height of tree */
/**
* @param[in] root the root of the tree

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.

Copy link
Member Author

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.

@github-actions github-actions bot dismissed stale reviews from tjgurwara99 and Panquesito7 via 16024c0 February 4, 2023 00:23
@Panquesito7
Copy link
Member

Will be merging for now. If there are any objections/things to change, feel free to create another PR. 🙂

@Panquesito7 Panquesito7 merged commit cc33efd into TheAlgorithms:master Feb 4, 2023
@vil02 vil02 deleted the memory_leak_avltree branch February 4, 2023 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement improvement in previously written codes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants