We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45c64a8 commit e139d0fCopy full SHA for e139d0f
Lib/UIRibbonCommands.pas
@@ -3757,8 +3757,8 @@ destructor TUICollection.Destroy;
3757
begin
3758
{ The ribbon takes additional ownership of the collection, so we must
3759
release it to avoid a memory leak. See issue #34 }
3760
- while FHandle._Release() > 1 do;
3761
- FHandle := nil;
+ while FHandle._Release() > 0 do;
+ Pointer(FHandle) := nil; // Set to nil without decreasing ref count, this was done the line before. See issue #39
3762
Inherited;
3763
end;
3764
0 commit comments