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

Bugfix/memory leak #483

Merged
merged 10 commits into from
Jan 24, 2019
Merged

Bugfix/memory leak #483

merged 10 commits into from
Jan 24, 2019

Conversation

gilwoolee
Copy link
Contributor

@gilwoolee gilwoolee commented Jan 16, 2019

This PR fixes memory leak in Interpolated::addWaypoint, which uses allocateState but never frees. This PR adds destructor and calls freeState during destruction.

I tested with valgrind in test_ParabolicTimer and it reduces memory leak from 803 bytes to 51 bytes (the 51 bytes are coming from something else at the moment.)


Before creating a pull request

  • Document new methods and classes
  • Format code with make format

Before merging a pull request

  • Set version target by selecting a milestone on the right side
  • Summarize this change in CHANGELOG.md
  • Add unit test(s) for this change

brianhou
brianhou previously approved these changes Jan 16, 2019
Copy link
Contributor

@brianhou brianhou left a comment

Choose a reason for hiding this comment

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

Looks good to me. Great catch!

jslee02
jslee02 previously approved these changes Jan 17, 2019
Copy link
Member

@jslee02 jslee02 left a comment

Choose a reason for hiding this comment

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

👍

src/trajectory/Interpolated.cpp Outdated Show resolved Hide resolved
@gilwoolee gilwoolee dismissed stale reviews from jslee02 and brianhou via f39410a January 19, 2019 07:57
brianhou
brianhou previously approved these changes Jan 19, 2019
jslee02
jslee02 previously approved these changes Jan 20, 2019
@gilwoolee gilwoolee added this to the Aikido 0.3.0 milestone Jan 24, 2019
@gilwoolee gilwoolee merged commit 3ea64b3 into master Jan 24, 2019
@gilwoolee gilwoolee deleted the bugfix/memory_leak branch January 24, 2019 16:40
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.

3 participants