Code: Select all
import Part
edge = Part.LineSegment(FreeCAD.Vector(0,0,0),FreeCAD.Vector(2,2,2)).toShape()
for i in range(100000):
edges = edge.Edges
for e in edges:
isinstance(e.Curve, (Part.LineSegment, Part.Line))
From brief experiments on my end, I have found out that the GB-size memory leak happens when I try to use snapping on a particular object (part of a multi-part assembly) which causes FreeCAD to "think" a lot. Unfortunately, I don't think I can post the file with that object in public because it may be proprietary. If I remove that part from the multi-part tree, I cannot detect a memory leak (but then FC snaps instantaneously and does not have to "think" to find snap points). I just use 'top' and look at its output for the memory consumption of each process as a % of the total memory.
Great, there are 63 more like this (related to python code) in the report, if someone finds some time...
Code: Select all
from pivy import coin
c = coin.SoCoordinate3()
pts = [[0.0,0.0,0.0],[1.0,1.0,1.0]]
for i in range(1000000):
c.point.setValues(pts)