- This topic has 2 replies, 2 voices, and was last updated 6 years ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Programming with SOFA › Memory Leaks
Tagged: 64_bits, Linux_ubuntu, memory leak, SOFA_1612
Hello,
I have discovered two memory leaks in SOFA while debugging my code. I hope this is the right place to post them.
The first is in Object.getDataFields()
I was using mechanicalobject.getDataFields()[“position”] at each iteration to get the coordinate of a MechanicalObject. This resulted in a data leak. I solved the problem by using mechanicalobject.findData(“position”).value.
The second happened by calling the MeshSpringForceField.init() method at each iteration. I simply removed the call since it wasn’t needed.
Yours,
Mahmoud
Thank you so much @mmabrouk for noticing us!
The right place to indify such issues with the code is the GitHub issues. There you can create new issue when needed!
However, the getDataFields seems outdated. I always used only the mechanicalobject.findData(“position”).value writing.
I created a GitHub issue for you for the MeshSpringForceField.
Best wishes,
Hugo
PS: is there anyone from Berlin willing to join us in Strasbourg for the SOFA Symposium?
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.