If you define a procedure that has an unclosed list literal (or unmatched parens) and that list contains an array literal, the array is leaked. This is, of course, an error, because the list must be closed (or the parens must be matched). However, FMSLogo shouldn't leak when there's an error in a procedure definition.
The leak is small and is connected with the attempt to define the procedure.
I have reproduced this on FMSLogo 8.5.0 under wine.
Steps to Reproduce:
1) Create a file named leak.lgo with the following content:
TO LEAK_ARRAY
[ {a b c}
END
You can do this programmatically with
OPENWRITE "leak.lgo
SETWRITE "leak.lgo
PRINT "|TO LEAK_ARRAY|
PRINT "| [ {a b c}|
PRINT "|END|
CLOSE "leak.lgo
2) Load the leak.lgo file. Due to the unclosed list literal, this throws an error that we can catch and ignore. To make the leak noticeable, we can load the file many times., To see the leak, we can use NODES.
SHOW NODES
REPEAT 10000 [ CATCH "ERROR [ LOAD "leak.lgo ] ]
SHOW NODES
What Happens:
The first item in the second call to NODES is much higher (>1000) than the first item in the first call to NODES.
Expected Result:
The first item in the second call to NODES is about the same (within 100) of first item in the first call to NODES.