mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-16 10:00:58 +02:00
FpDebug: fix missing refcount / possible dangling pointer for TypeSymbol
This commit is contained in:
parent
9352e5a40b
commit
66378dafd9
@ -2212,6 +2212,8 @@ end;
|
||||
constructor TFpValueDwarf.Create(ADwarfTypeSymbol: TFpSymbolDwarfType);
|
||||
begin
|
||||
FTypeSymbol := ADwarfTypeSymbol;
|
||||
if FTypeSymbol <> nil then
|
||||
FTypeSymbol.AddReference;
|
||||
inherited Create;
|
||||
end;
|
||||
|
||||
@ -2220,6 +2222,7 @@ begin
|
||||
FTypeCastSourceValue.ReleaseReference{$IFDEF WITH_REFCOUNT_DEBUG}(@FTypeCastSourceValue, ClassName+'.FTypeCastSourceValue'){$ENDIF};
|
||||
FStructureValue.ReleaseReference{$IFDEF WITH_REFCOUNT_DEBUG}(@FStructureValue, 'TDbgDwarfSymbolValue'){$ENDIF};
|
||||
FDataSymbol.ReleaseReference{$IFDEF WITH_REFCOUNT_DEBUG}(@FDataSymbol, ClassName+'.FDataSymbol'){$ENDIF};
|
||||
FTypeSymbol.ReleaseReference;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user