Memory leak during updating position of tetrapoly elements
Bug #1570679 reported by
MikeZhao
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Yade |
Fix Released
|
Undecided
|
Unassigned |
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]
O.bodies.
for i in range(1000000):
b = [[0,0,0]
O.bodies[
O.bodies[
O.bodies[
O.bodies[
O.bodies[
To post a comment you must log in.
setVertices now works without memory leaks passing each vertex as single argument
O.bodies[ 0].shape. setVertices( b[0],b[ 1],b[2] ,b[3])
or
O.bodies[ 0].shape. setVertices( *b) # *b in Python does internally the above code
currently implemented only for 4 vertices, if needed it is easy to extend to more vertices
Jan