lazdebugger: remove queued async calls

git-svn-id: trunk@46950 -
This commit is contained in:
mattias 2014-11-22 00:12:06 +00:00
parent 62c23192e8
commit f9700880fa

View File

@ -70,7 +70,7 @@ type
TFpDebugDebugger = class(TDebuggerIntf) TFpDebugDebugger = class(TDebuggerIntf)
private private
FWatchEvalList: TList; // Schedule FWatchEvalList: TFPList; // Schedule
FWatchAsyncQueued: Boolean; FWatchAsyncQueued: Boolean;
FPrettyPrinter: TFpPascalPrettyPrinter; FPrettyPrinter: TFpPascalPrettyPrinter;
FDbgController: TDbgController; FDbgController: TDbgController;
@ -341,6 +341,7 @@ end;
destructor TFpWaitForConsoleOutputThread.Destroy; destructor TFpWaitForConsoleOutputThread.Destroy;
begin begin
Application.RemoveAsyncCalls(Self);
RTLeventdestroy(FHasConsoleOutputQueued); RTLeventdestroy(FHasConsoleOutputQueued);
inherited Destroy; inherited Destroy;
end; end;
@ -970,6 +971,7 @@ end;
destructor TFpDebugThread.Destroy; destructor TFpDebugThread.Destroy;
begin begin
Application.RemoveAsyncCalls(Self);
RTLeventdestroy(FStartDebugLoopEvent); RTLeventdestroy(FStartDebugLoopEvent);
RTLeventdestroy(FDebugLoopStoppedEvent); RTLeventdestroy(FDebugLoopStoppedEvent);
inherited Destroy; inherited Destroy;
@ -1701,7 +1703,7 @@ end;
constructor TFpDebugDebugger.Create(const AExternalDebugger: String); constructor TFpDebugDebugger.Create(const AExternalDebugger: String);
begin begin
inherited Create(AExternalDebugger); inherited Create(AExternalDebugger);
FWatchEvalList := TList.Create; FWatchEvalList := TFPList.Create;
FPrettyPrinter := TFpPascalPrettyPrinter.Create(sizeof(pointer)); FPrettyPrinter := TFpPascalPrettyPrinter.Create(sizeof(pointer));
InitCriticalSection(FLogCritSection); InitCriticalSection(FLogCritSection);
FMemReader := TFpDbgMemReader.Create(self); FMemReader := TFpDbgMemReader.Create(self);
@ -1718,13 +1720,14 @@ end;
destructor TFpDebugDebugger.Destroy; destructor TFpDebugDebugger.Destroy;
begin begin
Application.RemoveAsyncCalls(Self);
if assigned(FFpDebugThread) then if assigned(FFpDebugThread) then
FreeDebugThread; FreeDebugThread;
FDbgController.Free; FreeAndNil(FDbgController);
FPrettyPrinter.Free; FreeAndNil(FPrettyPrinter);
FWatchEvalList.Free; FreeAndNil(FWatchEvalList);
FMemManager.Free; FreeAndNil(FMemManager);
FMemReader.Free; FreeAndNil(FMemReader);
DoneCriticalsection(FLogCritSection); DoneCriticalsection(FLogCritSection);
inherited Destroy; inherited Destroy;
end; end;