IdeDebugger: fix detecting if current watch was freed.

This commit is contained in:
Martin 2024-09-22 17:05:46 +02:00
parent a814cbd968
commit 5192cd95d9

View File

@ -557,6 +557,7 @@ type
const AThreadId: Integer;
const AStackFrame: Integer
);
destructor Destroy; override;
procedure Assign(AnOther: TWatchValue); override;
property Watch: TIdeWatch read GetWatch;
@ -4631,6 +4632,13 @@ begin
FStackFrame := AStackFrame;
end;
destructor TIdeWatchValue.Destroy;
begin
inc(DbgStateChangeCounter);
if DbgStateChangeCounter = high(DbgStateChangeCounter) then DbgStateChangeCounter := 0;
inherited Destroy;
end;
procedure TIdeWatchValue.Assign(AnOther: TWatchValue);
begin
inherited Assign(AnOther);