mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-06 09:07:31 +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;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
inherited DoStateChange(AOldState);
|
inherited DoStateChange(AOldState);
|
||||||
if Debugger.State in [dsPause, dsInternalPause] then
|
if Debugger.State in [dsPause, dsInternalPause, dsStop] then
|
||||||
begin
|
begin
|
||||||
if FDelayedRemoveBreakpointList.Count>0 then begin
|
if FDelayedRemoveBreakpointList.Count>0 then begin
|
||||||
debuglnEnter(DBG_BREAKPOINTS, ['TFPBreakpoints.DoStateChange REMOVE DELAYED']);
|
debuglnEnter(DBG_BREAKPOINTS, ['TFPBreakpoints.DoStateChange REMOVE DELAYED']);
|
||||||
@ -2254,6 +2254,12 @@ end;
|
|||||||
|
|
||||||
destructor TFpDebugDebugger.Destroy;
|
destructor TFpDebugDebugger.Destroy;
|
||||||
begin
|
begin
|
||||||
|
if state in [dsPause, dsInternalPause] then
|
||||||
|
try
|
||||||
|
FreeAndNil(FRaiseExceptionBreakpoint);
|
||||||
|
SetState(dsStop);
|
||||||
|
except
|
||||||
|
end;
|
||||||
if assigned(FFpDebugThread) then
|
if assigned(FFpDebugThread) then
|
||||||
FreeDebugThread;
|
FreeDebugThread;
|
||||||
ClearWatchEvalList;
|
ClearWatchEvalList;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user