2024年4月2日发(作者:)

:= Format('进程 %d 没有关闭', [ThdHandle]);

end;

finally

if ThdHandle <> 0 then

closehandle(ThdHandle);

if P <> nil then

FreeMem(P);

end;

end;

procedure ow(Sender: TObject);

begin

ThdCount := 1;

InitializeCriticalSection(CS); //初始化临界

end;

procedure stroy(Sender: TObject);

begin

DeleteCriticalSection(CS); //释放临界

end;

end.

View Code