1
0
mirror of https://github.com/moparisthebest/Simba synced 2025-03-03 02:41:54 -05:00

No more leaks in TestUnit

This commit is contained in:
Raymond 2010-04-16 20:50:10 +02:00
parent fc589788e5
commit 1a8e3977b7
3 changed files with 15 additions and 1 deletions

View File

@ -2359,7 +2359,7 @@ function TForm1.GetSimbaNews: String;
var
t: TDownloadThread;
begin
t := TDownloadThread.Create(true);
t := TDownloadThread.Create;
t.InputURL:=LoadSettingDef('Settings/News/URL', 'http://simba.villavu.com/bin/news');
t.Resume;
while not t.done do

View File

@ -19,6 +19,7 @@ type
ResultStr : string;
InputURL : string;
Done : boolean;
constructor Create;
procedure Execute; override;
end;
TSimbaUpdateForm = class(TForm)
@ -263,6 +264,12 @@ begin
FUpdating:= false;
end;
constructor TDownloadThread.Create;
begin
inherited Create(true);
FreeOnTerminate:= True;
end;
{ TDownloadThread }
procedure TDownloadThread.Execute;

View File

@ -18,6 +18,7 @@ type
StartWait : Cardinal;
ClassProc : procedure of object;
NormalProc : procedure;
constructor Create;
procedure Execute; override;
end;
@ -132,6 +133,12 @@ begin;
end;
constructor TProcThread.Create;
begin
inherited Create(true);
FreeOnTerminate:= True;
end;
{ TProcThread }