通过一个事件来建立(多次)
line6_thread.Create(line_number[1],handle);
。
//定义线程
constructor line6_thread.Create(const p_line6id: integer;
const p_line6handle: thandle);procedure line6_thread.Execute;
begin
inherited;
freeonterminate := True;
while True do
begin
if terminated then break;
Synchronize(readmem);
end;
end;procedure line6_thread.readmem;
begin
Terminate; //结束线程????????????????
end;
在程序运行多天没有内存益出。
请大侠指教这样来处理是否正确。特别是在结束时的处理
line6_thread.Create(line_number[1],handle);
。
//定义线程
constructor line6_thread.Create(const p_line6id: integer;
const p_line6handle: thandle);procedure line6_thread.Execute;
begin
inherited;
freeonterminate := True;
while True do
begin
if terminated then break;
Synchronize(readmem);
end;
end;procedure line6_thread.readmem;
begin
Terminate; //结束线程????????????????
end;
在程序运行多天没有内存益出。
请大侠指教这样来处理是否正确。特别是在结束时的处理
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货