mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-04 04:37:35 +01:00
FpDebug: Fix a leak when stopping/reseting the debugger under heavy multithreaded load. (Windows may have queued events, then the next pause may not be the expected ExitProcess, and clean-up is not triggered.
git-svn-id: trunk@62032 -
This commit is contained in:
parent
9cad1b3feb
commit
bb9f614179
@ -818,7 +818,7 @@ var
|
||||
i: Integer;
|
||||
begin
|
||||
inherited DoStateChange(AOldState);
|
||||
if Debugger.State in [dsPause, dsInternalPause] then
|
||||
if Debugger.State in [dsPause, dsInternalPause, dsStop] then
|
||||
begin
|
||||
if FDelayedRemoveBreakpointList.Count>0 then begin
|
||||
debuglnEnter(DBG_BREAKPOINTS, ['TFPBreakpoints.DoStateChange REMOVE DELAYED']);
|
||||
@ -2254,6 +2254,12 @@ end;
|
||||
|
||||
destructor TFpDebugDebugger.Destroy;
|
||||
begin
|
||||
if state in [dsPause, dsInternalPause] then
|
||||
try
|
||||
FreeAndNil(FRaiseExceptionBreakpoint);
|
||||
SetState(dsStop);
|
||||
except
|
||||
end;
|
||||
if assigned(FFpDebugThread) then
|
||||
FreeDebugThread;
|
||||
ClearWatchEvalList;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user