mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 15:47:51 +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;
|
destructor TCollection.Destroy;
|
||||||
begin
|
begin
|
||||||
BeginUpdate; // Prevent OnChange
|
FUpdateCount:=1; // Prevent OnChange
|
||||||
DoClear;
|
try
|
||||||
|
DoClear;
|
||||||
|
Finally
|
||||||
|
FUpdateCount:=0;
|
||||||
|
end;
|
||||||
FItems.Free;
|
FItems.Free;
|
||||||
Inherited Destroy;
|
Inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user