Hi, fixed the leak. The cause is actually in SRL. I found out there's several functions which are not freed properly. For instance, why my script was leaking, was this from SRL:
Simba Code:
function PercentColorMMEx(Color, Tol, StartRadial, EndRadial, StartRadius, EndRadius: Integer): integer;
var
TPA: TPointArray;
begin
FindColorsTolerance(TPA, Color, MMX1, MMY1, MMX2, MMY2, Tol);
FilterPointsPie(TPA, StartRadial, EndRadial, StartRadius, EndRadius, MMCX, MMCY);
Result := ceil((Length(TPA) * 100) / ((Pi * (EndRadius * EndRadius)) * ((EndRadial - StartRadial) / 360.0)-((Pi * (StartRadius * StartRadius)) * ((EndRadial - StartRadial) / 360.0))));
end;
In that function TPA is never freed. This fixes the function:
Simba Code:
function PercentColorMMEx(Color, Tol, StartRadial, EndRadial, StartRadius, EndRadius: Integer): integer;
begin
...
SetLength(tpa, 0);
end;
This function is only one of the many I found.
E:
SmartGraphics is leaking as well. I have to fix those as well..