mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 11:39:32 +02:00
* finalize needs to reset to nil after decr_ref
This commit is contained in:
parent
7ca7f97ba1
commit
6dc4cd8b82
@ -149,10 +149,16 @@ begin
|
||||
Temp:=PByte(TypeInfo);
|
||||
case temp^ of
|
||||
tkAstring :
|
||||
fpc_AnsiStr_Decr_Ref(PPointer(Data)^);
|
||||
begin
|
||||
fpc_AnsiStr_Decr_Ref(PPointer(Data)^);
|
||||
PPchar(Data)^:=Nil;
|
||||
end;
|
||||
{$ifdef HASWIDESTRING}
|
||||
tkWstring :
|
||||
fpc_WideStr_Decr_Ref(PPointer(Data)^);
|
||||
begin
|
||||
fpc_WideStr_Decr_Ref(PPointer(Data)^);
|
||||
PPchar(Data)^:=Nil;
|
||||
end;
|
||||
{$endif HASWIDESTRING}
|
||||
tkArray :
|
||||
begin
|
||||
@ -313,7 +319,10 @@ procedure fpc_finalize_array(data,typeinfo : pointer;count,size : longint); [Pub
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.7 2002-09-07 15:07:46 peter
|
||||
Revision 1.8 2004-01-22 22:09:05 peter
|
||||
* finalize needs to reset to nil after decr_ref
|
||||
|
||||
Revision 1.7 2002/09/07 15:07:46 peter
|
||||
* old logs removed and tabs fixed
|
||||
|
||||
Revision 1.6 2002/09/02 18:42:41 peter
|
||||
|
@ -102,7 +102,7 @@ begin
|
||||
GetWideStringManager(Old);
|
||||
SetWideStringManager(New);
|
||||
end;
|
||||
|
||||
|
||||
Procedure SetWideStringManager (Const New : TWideStringManager);
|
||||
|
||||
begin
|
||||
@ -201,8 +201,6 @@ Begin
|
||||
If declocked(l^) then
|
||||
{ Ref count dropped to zero }
|
||||
DisposeWideString (S); { Remove...}
|
||||
{ this pointer is not valid anymore, so set it to zero }
|
||||
S:=nil;
|
||||
end;
|
||||
|
||||
{$ifdef hascompilerproc}
|
||||
@ -1011,7 +1009,10 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.34 2003-11-29 17:27:05 michael
|
||||
Revision 1.35 2004-01-22 22:09:05 peter
|
||||
* finalize needs to reset to nil after decr_ref
|
||||
|
||||
Revision 1.34 2003/11/29 17:27:05 michael
|
||||
+ Added overloaded version of SetWideStringManager without old parameter
|
||||
|
||||
Revision 1.33 2003/11/28 20:36:13 michael
|
||||
|
Loading…
Reference in New Issue
Block a user