dimmaq / omnithreadlibrary

Automatically exported from code.google.com/p/omnithreadlibrary
0 stars 0 forks source link

Memory leaks with IOmniTaskControl.Run #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Create a task like this:
procedure SomeMethod(const Task: IOmniTask);
begin
  Exit;
end;

.....
var
  T: IOmniTaskControl;
begin
  T := CreateTask(SomeMethod, 'New');
  T.Run();
  Sleep(2000);
  T.Run();
end;

if you start application with FastMM4 support then it will report memory leaks. 
See attachment.

If you run it like:
.....
var
  T: IOmniTaskControl;
begin
  T := CreateTask(SomeMethod, 'New');
  T.Run();
end;

Then FastMM registers no leaks.

Original issue reported on code.google.com by anton.na...@gmail.com on 25 Jun 2012 at 6:16

Attachments:

GoogleCodeExporter commented 9 years ago
Expected. Task can not be run twice.

Original comment by gabr42 on 25 Jun 2012 at 6:32