yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #12617
[Bug 1570679] [NEW] Memory leak during updating position of tetrapoly elements
Public bug reported:
There exists severe memory leaking problem when using intermediate
variables to update positions of tetraPoly in a loop:
running the code, the memory will keep leaking:
#
a = [[0,0,0],[0,0,1],[0,1,0],[1,0,0]]
O.bodies.append(yade.utils.tetraPoly(a))
for i in range(1000000):
b = [[0,0,0],[0,0,1],[0,1,0],[i+2,0,0]]
O.bodies[0].shape.setVertices(b)
O.bodies[0].state.ori = O.bodies[0].shape.GetOri()
O.bodies[0].state.pos = O.bodies[0].shape.GetCentroid()
O.bodies[0].state.mass = O.bodies[0].mat.density * O.bodies[0].shape.GetVolume()
O.bodies[0].state.inertia = O.bodies[0].mat.density * O.bodies[0].shape.GetInertia()
** Affects: yade
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.
https://bugs.launchpad.net/bugs/1570679
Title:
Memory leak during updating position of tetrapoly elements
Status in Yade:
New
Bug description:
There exists severe memory leaking problem when using intermediate
variables to update positions of tetraPoly in a loop:
running the code, the memory will keep leaking:
#
a = [[0,0,0],[0,0,1],[0,1,0],[1,0,0]]
O.bodies.append(yade.utils.tetraPoly(a))
for i in range(1000000):
b = [[0,0,0],[0,0,1],[0,1,0],[i+2,0,0]]
O.bodies[0].shape.setVertices(b)
O.bodies[0].state.ori = O.bodies[0].shape.GetOri()
O.bodies[0].state.pos = O.bodies[0].shape.GetCentroid()
O.bodies[0].state.mass = O.bodies[0].mat.density * O.bodies[0].shape.GetVolume()
O.bodies[0].state.inertia = O.bodies[0].mat.density * O.bodies[0].shape.GetInertia()
To manage notifications about this bug go to:
https://bugs.launchpad.net/yade/+bug/1570679/+subscriptions
Follow ups