mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 20:59:08 +02:00
* quicker finalization of dyn. arrays, thanks to the hint of Volker Zipfel
git-svn-id: trunk@11357 -
This commit is contained in:
parent
930de03fae
commit
f56b741948
@ -470,7 +470,7 @@ Procedure fpc_Initialize (Data,TypeInfo : pointer); compilerproc;
|
|||||||
Procedure fpc_finalize (Data,TypeInfo: Pointer); compilerproc;
|
Procedure fpc_finalize (Data,TypeInfo: Pointer); compilerproc;
|
||||||
Procedure fpc_Addref (Data,TypeInfo : Pointer); compilerproc;
|
Procedure fpc_Addref (Data,TypeInfo : Pointer); compilerproc;
|
||||||
Procedure fpc_DecRef (Data,TypeInfo : Pointer); compilerproc;
|
Procedure fpc_DecRef (Data,TypeInfo : Pointer); compilerproc;
|
||||||
procedure fpc_finalize_array(data,typeinfo : pointer;count,size : longint); compilerproc;
|
procedure fpc_finalize_array(data,typeinfo : pointer;count,size : SizeInt); compilerproc;
|
||||||
Function fpc_Copy (Src, Dest, TypeInfo : Pointer) : SizeInt; compilerproc;
|
Function fpc_Copy (Src, Dest, TypeInfo : Pointer) : SizeInt; compilerproc;
|
||||||
Procedure fpc_Copy_proc (Src, Dest, TypeInfo : Pointer); compilerproc; inline;
|
Procedure fpc_Copy_proc (Src, Dest, TypeInfo : Pointer); compilerproc; inline;
|
||||||
{$endif FPC_HAS_FEATURE_RTTI}
|
{$endif FPC_HAS_FEATURE_RTTI}
|
||||||
|
@ -335,11 +335,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure fpc_finalize_array(data,typeinfo : pointer;count,size : longint); [Public,Alias:'FPC_FINALIZEARRAY']; compilerproc;
|
procedure fpc_finalize_array(data,typeinfo : pointer;count,size : SizeInt); [Public,Alias:'FPC_FINALIZEARRAY']; compilerproc;
|
||||||
var
|
var
|
||||||
i : longint;
|
i : SizeInt;
|
||||||
begin
|
begin
|
||||||
for i:=0 to count-1 do
|
if not(PByte(typeinfo)^ in [tkInteger,tkChar,tkEnumeration,tkFloat,tkSet,
|
||||||
int_finalize(data+size*i,typeinfo);
|
tkMethod,tkSString,tkLString,tkWChar,tkBool,tkInt64,tkQWord]) then
|
||||||
|
for i:=0 to count-1 do
|
||||||
|
int_finalize(data+size*i,typeinfo);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user