\r
var\r
firsttimer : tltimer ;\r
- firsttask , lasttask , currenttask : tltask ;\r
+ firsttask , lasttask : tltask ;\r
\r
numread : integer ;\r
mustrefreshfds : boolean ;\r
{$endif}\r
\r
procedure processtasks;//inline;\r
+var\r
+ currenttask:tltask;\r
begin\r
\r
while assigned(firsttask) do begin\r
if not assigned(firsttask) then lasttask := nil;\r
\r
if assigned(currenttask.handler) then currenttask.handler(currenttask.wparam,currenttask.lparam);\r
-\r
+ currenttask.free;\r
end;\r
currenttask := nil;\r
end;\r
prepsigpipe;\r
{$endif}\r
selectresult := select(maxs+1,@fdsr,@fdsw,nil,0);\r
- while (selectresult>0) or assigned(firsttask) or assigned(currenttask) do begin;\r
+ while (selectresult>0) or assigned(firsttask) do begin;\r
\r
processtasks;\r
processtimers;\r