Cocoa: fix leaks in TCocoaCollectionItemView

This commit is contained in:
rich2014 2024-10-31 21:47:40 +08:00
parent c7251287ce
commit 06c50ab4cc

View File

@ -56,6 +56,7 @@ type
procedure mouseEntered(theEvent: NSEvent); override;
procedure mouseExited(theEvent: NSEvent); override;
procedure drawRect(dirtyRect: NSRect); override;
procedure dealloc; override;
end;
{ TCocoaCollectionView }
@ -723,6 +724,14 @@ begin
end;
end;
procedure TCocoaCollectionItemView.dealloc;
begin
if Assigned(self.trackingArea) then begin
removeTrackingArea(self.trackingArea);
self.trackingArea.release;
end;
end;
{ TCocoaCollectionView }
procedure TCocoaCollectionView.lclSetCheckBoxes(checkBoxes: Boolean);