-
Notifications
You must be signed in to change notification settings - Fork 60
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 Fixes #819
Comments
Howdy @KD-92 , thanks for the feedback. Something to look at in more detail. Regarding item 3., the reason we use |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When reinitializing the Simulator repeatedly, e.g., in a Reinforcement Learning (RL) setting, memory growth can be observed. Please find different fixes below (this is not a Pull Request due to the last item in the list).
To reproduce
In addition to issue #441, the destructor
ReactionWheelStateEffector::~ReactionWheelStateEffector()
insrc/simulation/dynamics/reactionWheels/reactionWheelStateEffector.cpp
usesfree()
on a data structure allocated withnew
. Additionally, it may be helpful to delete the elements ofrwOutMsgs
:Py_DECREF
in SWIG Eigen Type MapThere are missing
Py_DECREF
insrc/architecture/_GeneralModuleFiles/swig_eigen.i
in the fragmentcheckPyObjectIsMatrixLike
. The changes are annotated withnew decrement
.Msg disown()
It may be of interest to verify whether
<type>Msg.this.disown()
is necessary in:Expected behavior
With these changes, memory growth became unnoticeable for us even after millions of iterations.
The text was updated successfully, but these errors were encountered: