Open josefbehr opened 11 years ago
Die you check whether the collision objects are automatically destroyed in the simbody base Class? Currently I cannot check this myself. Setup and cleanup are called during each reset, so collision objects should not be created and destroyed there to avoid the unnecessary overhead.
Josef Behr notifications@github.com schrieb:
Is there a specific reason that CollisionObjects are mostly created in the constructor of a simulation object, but never explicitly de-registered or destroyed? Would it be reasonable to include the creation and destruction of CollisionObjects into the setup() and clear() processes?
— Reply to this email directly or view it on GitHub.
Apparently, there once was code in SimBody.cpp (https://github.com/nerd-toolkit/nerd/blob/master/nerd/simulator/simulator/Physics/SimBody.cpp#L156) that removed the CollisionObjects, but it has been commented out and stated the owners should take care of that. Either that or the code is de-commented, I guess.
Then the best measure for now is to keep it unchanged and to do a check for memory leaks later. I try to find out why I commented out the delete statements in the first place.
Josef Behr notifications@github.com schrieb:
Apparently, there once was code in SimBody.cpp (https://github.com/nerd-toolkit/nerd/blob/master/nerd/simulator/simulator/Physics/SimBody.cpp#L156) that removed the CollisionObjects, but it has been commented out and stated the owners should take care of that. Either that or the code is de-commented, I guess.
— Reply to this email directly or view it on GitHub.
Is there a specific reason that CollisionObjects are mostly created in the constructor of a simulation object, but never explicitly de-registered or destroyed? Would it be reasonable to include the creation and destruction of CollisionObjects into the setup() and clear() processes?