dimmaq / omnithreadlibrary

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

Memory leaks with IOmniTaskControl.Terminate(0) #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Create Task like this:

procedure TMainForm.Test(const Task: IOmniTask);
begin
  MessageBox(0, 'ok', 'ok', MB_OK);
end;

...
var
  T: IOmniTaskControl;
begin
  T := CreateTask(Test, 'New');
  T.Run();
  T.Terminate(0);
end;

if you use FastMM4 it will register memory leaks. See in attachment 

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

Attachments:

GoogleCodeExporter commented 9 years ago
Expected. Task was not properly terminated. Wait for the task to complete (for 
example with T.Terminate(INFINITE)) and then set task reference to nil (T := 
nil).

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