mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-06 10:07:19 +01:00
IDE: fixed valgrind warning TExtToolView.Destroy, issue #38959
git-svn-id: trunk@65170 -
This commit is contained in:
parent
8a96677e5d
commit
b0732509f7
@ -2323,20 +2323,15 @@ end;
|
||||
|
||||
destructor TExtToolView.Destroy;
|
||||
begin
|
||||
// wait for other threads to finish their access
|
||||
EnterCriticalSection;
|
||||
try
|
||||
if (Tool<>nil) and (not (csDestroying in Tool.ComponentState)) then
|
||||
Tool.RemoveView(Self);
|
||||
RemoveAsyncOnChanged;
|
||||
ClearLines;
|
||||
FreeAndNil(FProgressLine);
|
||||
FreeAndNil(FPendingLines);
|
||||
FreeAndNil(FPendingProgressLine);
|
||||
inherited Destroy;
|
||||
finally
|
||||
LeaveCriticalSection;
|
||||
end;
|
||||
if (Tool<>nil) and (not (csDestroying in Tool.ComponentState)) then
|
||||
Tool.RemoveView(Self);
|
||||
// no need for EnterCriticalSection, issue 38959
|
||||
RemoveAsyncOnChanged;
|
||||
ClearLines;
|
||||
FreeAndNil(FProgressLine);
|
||||
FreeAndNil(FPendingLines);
|
||||
FreeAndNil(FPendingProgressLine);
|
||||
inherited Destroy;
|
||||
FreeAndNil(FLines);
|
||||
end;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user