* fixed for non-Windows and non-OS/2

git-svn-id: trunk@4411 -
This commit is contained in:
Jonas Maebe 2006-08-12 12:23:19 +00:00
parent d337c3ca6a
commit ec1d8a139f

View File

@ -693,11 +693,16 @@ Begin
Flush(ErrOutput);
Flush(StdOut);
Flush(StdErr);
{$if defined(MSWINDOWS) or defined(OS2)}
{ finally release the heap if possible, especially
important for DLLs }
for i:=0 to argc do
sysfreemem(argv[i]);
sysfreemem(argv);
{$endif}
{$if defined(LINUX) or defined(BSD)}
sysfreemem(cmdline);
{$endif}
FinalizeHeap;
End;