mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 16:09:33 +02:00
* Make sure UpdateCount=0 when inherited destructor is called (and ooFree is dispatched (Bug ID 25821)
git-svn-id: trunk@26960 -
This commit is contained in:
parent
15bb6b2c72
commit
a1252febae
@ -302,8 +302,12 @@ end;
|
||||
|
||||
destructor TCollection.Destroy;
|
||||
begin
|
||||
BeginUpdate; // Prevent OnChange
|
||||
DoClear;
|
||||
FUpdateCount:=1; // Prevent OnChange
|
||||
try
|
||||
DoClear;
|
||||
Finally
|
||||
FUpdateCount:=0;
|
||||
end;
|
||||
FItems.Free;
|
||||
Inherited Destroy;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user