Hello Everyone
I have read that memory leak when running scripts in Catia is a "feature", but until now I didn't realize that it leaks like a sieve. Or maybe I'm doing something wrong.
I wrote a simple script to test this:
Below screens from task manager before running script, after first run and the second:
CATDUA shows no errors, garbage collector should clean oDocument and oPoint at the end of the script, so where is the problem?
Regards
Peter
I have read that memory leak when running scripts in Catia is a "feature", but until now I didn't realize that it leaks like a sieve. Or maybe I'm doing something wrong.
I wrote a simple script to test this:
Code:
Sub CATMain()
Dim oDocument As PartDocument
Dim oPoint As HybridShapePointCoord
Set oDocument = CATIA.ActiveDocument
For i=0 To 10000
Set oPoint = oDocument.Part.HybridShapeFactory.AddNewPointCoord(0, 0, 0)
oDocument.Part.HybridShapeFactory.DeleteObjectForDatum oPoint
Next
End Sub
Below screens from task manager before running script, after first run and the second:
CATDUA shows no errors, garbage collector should clean oDocument and oPoint at the end of the script, so where is the problem?
Regards
Peter