diff --git a/components/fpdebug/fpdbgclasses.pp b/components/fpdebug/fpdbgclasses.pp index 75ff54cc63..f10c029873 100644 --- a/components/fpdebug/fpdbgclasses.pp +++ b/components/fpdebug/fpdbgclasses.pp @@ -484,7 +484,7 @@ end; destructor TDbgCallstackEntry.Destroy; begin FreeAndNil(FRegisterValueList); - FreeAndNil(FSymbol); + ReleaseRefAndNil(FSymbol); inherited Destroy; end; diff --git a/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas b/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas index ff765b9c0a..750b0c665b 100644 --- a/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas +++ b/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas @@ -525,7 +525,7 @@ begin params := params + v; end; end; - AContext.Free; + AContext.ReleaseReference; end; end; end;