mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 19:29:26 +02:00
* Fixed memory corruption with finalize() of ansistring in a class
This commit is contained in:
parent
3123d15a75
commit
2de56ad75e
@ -74,6 +74,7 @@ Procedure fpc_Finalize (Data,TypeInfo: Pointer);saveregisters;[Public,Alias : 'F
|
||||
already defined or not so define it locally to avoid problems PM }
|
||||
Type
|
||||
Pbyte = ^Byte;
|
||||
PPointer = ^Pointer;
|
||||
Var Temp : PByte;
|
||||
I : longint;
|
||||
Size,Count : longint;
|
||||
@ -83,7 +84,7 @@ begin
|
||||
Temp:=PByte(TypeInfo);
|
||||
case temp^ of
|
||||
tkAstring,tkWstring:
|
||||
fpc_AnsiStr_Decr_Ref(Data);
|
||||
fpc_AnsiStr_Decr_Ref(PPointer(Data)^);
|
||||
tkArray :
|
||||
begin
|
||||
inc(Temp);
|
||||
@ -235,7 +236,10 @@ procedure fpc_FinalizeArray(data,typeinfo : pointer;count,size : longint); [Publ
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.8 2001-11-17 16:56:08 florian
|
||||
Revision 1.9 2001-11-22 07:33:08 michael
|
||||
* Fixed memory corruption with finalize() of ansistring in a class
|
||||
|
||||
Revision 1.8 2001/11/17 16:56:08 florian
|
||||
* init and final code in genrtti.inc updated
|
||||
|
||||
Revision 1.7 2001/11/17 10:29:48 florian
|
||||
|
Loading…
Reference in New Issue
Block a user