blob: a0f74434179713c6135f2a283bae57d8a91ccf87 (
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
|
{ %opt=-gh }
program resultmemleak;
{$ifdef FPC}{$mode objfpc}{$h+}{$INTERFACES CORBA}{$endif}
{$ifdef mswindows}{$apptype console}{$endif}
//compile with -gh
uses
{$ifdef FPC}{$ifdef linux}cthreads,{$endif}{$endif}
sysutils;
type
integerarty = array of integer;
function testproc: integerarty;
begin
setlength(result,100);
raise exception.create('');
end;
var
ar1: integerarty;
begin
HaltOnNotReleased := true;
try
ar1:= testproc;
except
end;
end.
|