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.
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.
PS: is there anyone from Berlin willing to join us in Strasbourg for the SOFA Symposium?
You must be logged in to reply to this topic.
Get involved in this forum: