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

Call destructor first before doing placement-new on workspace and results objects #192

Conversation

ManifoldFR
Copy link
Member

This PR fixes solver-fddp.hxx and solver-proxddp.hxx to explicitly call the destructor on the workspace and results objects before doing placement new in the Solver::setup() member function.

The previous behaviour created a memory leak before the previous object never got destroyed.

Closes #189

Copy link
Collaborator

@edantec edantec left a comment

Choose a reason for hiding this comment

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

Sounds good

@ManifoldFR ManifoldFR merged commit f110f9b into Simple-Robotics:devel Sep 11, 2024
22 of 23 checks passed
@ManifoldFR ManifoldFR deleted the topic/placement-new-call-dtor-first branch September 11, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants