<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: arial,helvetica,sans-serif; font-size: 10pt; color: #000000'><font face="arial, helvetica, sans-serif">Hi,</font><div style="font-family: arial, helvetica, sans-serif; "><br></div><div style="font-family: arial, helvetica, sans-serif; ">I am having a memory leak problem with the following function in Python:</div><div style="font-family: arial, helvetica, sans-serif; "><br></div><div><div><font face="'courier new', courier, monaco, monospace, sans-serif">def changeScaleOfLidarPoints(lasPointList):</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif">&nbsp; &nbsp; for p in lasPointList:</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; (tmpx,tmpy,tmpz) = (p.x,p.y,p.z)</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; h = p.header</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; h.scale = [0.001,0.001,0.001]</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; p.header = h</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; p.x = tmpx</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; p.y = tmpy</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; p.z = tmpz</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; del h</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; del p</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif">&nbsp; &nbsp; del lasPointList</font></div></div><div style="font-family: arial, helvetica, sans-serif; "><br></div><div style="font-family: arial, helvetica, sans-serif; ">I am trying to use this function to change an existing list of points from a default scale of 0.01 to 0.001 and keeping the coordinate values.</div><div style="font-family: arial, helvetica, sans-serif; ">The memory leak probably has to do with the circular reference of the header, but that is the only way I can get the scale to change for the points.</div><div style="font-family: arial, helvetica, sans-serif; "><br></div><div style="font-family: arial, helvetica, sans-serif; ">Can someone please help me solve the memory leak or offer a workaround?</div><div style="font-family: arial, helvetica, sans-serif; "><br></div><div style="font-family: arial, helvetica, sans-serif; ">Thanks,</div><div style="font-family: arial, helvetica, sans-serif; "><br></div><div style="font-family: arial, helvetica, sans-serif; ">Stanley</div></div></body></html>