-
Notifications
You must be signed in to change notification settings - Fork 6
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
Memory leak in Equilibrium #6
Comments
The problem was when changing the member :
The '=' operator of qpOASES::SQProblem seems to allocate memory in their copy function which is lost then (memory leak).
Remarks :
Or can we instead do it just once in the constructor ? Doing so, would imply that we know the value of n and m in the constructor :
|
As far as I understand this code, your proposal should work. I believe that qpoases would be happy to have a minimal not-working example of this. If you do so, you may post it here: coin-or/qpOASES#30
The SQProblem is rebuilt only is the dimension of the problem changed. |
After further investigation, the problem does not come from qpOASES but from our implementation. |
We instantiate a new Solver_LP_abstract and never delete it.
hpp-centroidal-dynamics/src/centroidal_dynamics.cpp
Line 57 in 830c6ef
Result on valgrind :
Adding a destructor in Equilibrium class deleting the pointer m_solver to Solver_LP_abstract , create a new memory leak with qpOASES when calling function solve() of solver_LP :
hpp-centroidal-dynamics/src/solver_LP_qpoases.cpp
Line 22 in 830c6ef
The text was updated successfully, but these errors were encountered: