mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 02:27:56 +02:00
parent
ffc357a528
commit
d8eccf008d
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -10720,6 +10720,7 @@ tests/webtbs/tw17546.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1754c.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1755.pp svneol=native#text/plain
|
||||
tests/webtbs/tw17550.pp svneol=native#text/plain
|
||||
tests/webtbs/tw17560.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1758.pp svneol=native#text/plain
|
||||
tests/webtbs/tw17604.pp svneol=native#text/plain
|
||||
tests/webtbs/tw17646.pp svneol=native#text/plain
|
||||
|
28
tests/webtbs/tw17560.pp
Normal file
28
tests/webtbs/tw17560.pp
Normal file
@ -0,0 +1,28 @@
|
||||
{ %OPT=-gh }
|
||||
// Creating a suspended TThread and then destroying it should not cause memory leaks.
|
||||
// Also, Execute() method should not be called.
|
||||
|
||||
{$ifdef fpc}{$mode objfpc}{$endif}
|
||||
|
||||
uses SysUtils, Classes;
|
||||
|
||||
type
|
||||
TMyThread = class(TThread)
|
||||
procedure Execute; override;
|
||||
end;
|
||||
|
||||
var
|
||||
t: TThread;
|
||||
Flag: Boolean;
|
||||
|
||||
procedure TMyThread.Execute;
|
||||
begin
|
||||
flag := True;
|
||||
end;
|
||||
|
||||
begin
|
||||
Flag := False;
|
||||
t := TMyThread.Create(True);
|
||||
t.Free;
|
||||
Halt(ord(Flag));
|
||||
end.
|
Loading…
Reference in New Issue
Block a user