yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #15662
Re: [Question #657564]: continuous creation and destruction of bodies
Question #657564 on Yade changed:
https://answers.launchpad.net/yade/+question/657564
Robert Caulk proposed the following answer:
Yade uses smart pointers (shared_ptr in this case)[1], which
automatically manage memory deallocation when the last shared_ptr
pointing to an object is deleted or shared_ptr::reset is called. In the
case of bodies, it looks like the "erase" function is calling
shared_ptr::reset, so I believe the freed memory is available for newly
created bodies. You should be able to run your conveyor belt simulation
indefinitely.
[1]https://yade-dem.org/doc/prog.html#shared-pointers
--
You received this question notification because your team yade-users is
an answer contact for Yade.