gabr42 / gabr42/OmniThreadLibrary

Big memory leak (consumption) on pipeline running from another thread

Open
#69 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Pascal
Stars
513
Forks
147
PR merge metrics
No merged PRs in 30d

Description

Hello.

If you run pipeline from another thread you got big memory leak at runtime (but it will free on application close).

Here example. Click button 10 times and test app will get ~600 MB of memory. Windows 7 x64, Delphi XE6, latest omni source.

```
uses
OtlParallel,
OtlCommon;

procedure TForm75.Button1Click(Sender: TObject);
begin
// run empty pipeline from another threads
Parallel.&For(1, 100).Execute(
procedure(value: integer)
var
pipe: IOmniPipeline;
begin
pipe := Parallel.Pipeline
.Stage(procedure(const input: TOmniValue; var output: TOmniValue) begin end)
.Run;
pipe.Cancel;
pipe.WaitFor(100000);
pipe := nil;
end
);
end;
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.