blob: 3e3d4fac67837bd2e1d962947008062713f1d5e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
{ %OPT=-gh }
{ The only problem is that we don't really get a
non zero exitcode if some memory is not freed PM }
{ now we do, thanks to a patch of yours several years later :) }
{ Source provided for Free Pascal Bug Report 1433 }
{ Submitted by "Aleksey V. Vaneev" on 2001-03-10 }
{ e-mail: picoder@sbis.komi.ru }
{$mode objfpc}
function ExitTest1: Boolean;
var
aa: AnsiString;
begin
exit (False);
aa := 'BUMBUM';
end;
function ExitTest2: Boolean;
var
aa: AnsiString;
begin
Result := False;
exit;
aa := 'MUBMUB';
end;
begin
HaltOnNotReleased := true;
ExitTest1;
ExitTest2;
end.
|