memory leak in function lsq()
Reported by Jens
BUG DESCRIPTION:
----------------
The Scilab function lsq() has a memory leak. Each lsq() call allocates system memory, but does not seem to free it.
ERROR LOG:
----------
None
HOW TO REPRODUCE THE BUG:
-------------------------
Calling lsq() in a loop will quickly use all the RAM you PC has available.
Run following script multiple times or increase the for loop to increase the effect.
x = (-1:0.001:1)';
y = 3.0 * x + 4.5 + 3 * rand(x,'normal');
A = [x, ones(x)];
for i=1:10000
X = lsq(A, y);
end
OTHER INFORMATION:
------------------
Tested on Ubuntu Linux 14.04 LTS 64 Bit with Scilab 6.0.0 -> Scilab 5.5.2 does NOT have this issue.