mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-14 09:01:01 +02:00
Cocoa/ListView: in vsReport, memory management improved
This commit is contained in:
parent
87b0dfc5c9
commit
2e87241071
@ -105,6 +105,7 @@ type
|
||||
procedure backend_onInit;
|
||||
public
|
||||
procedure addSubview(aView: NSView); override;
|
||||
procedure dealloc; override;
|
||||
|
||||
procedure lclSetProcessor( processor: TCocoaTableViewProcessor ); message 'lclSetProcessor:';
|
||||
procedure lclSetCheckBoxes( checkBoxes: Boolean); message 'lclSetCheckBoxes:';
|
||||
@ -329,10 +330,10 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function AllocCocoaTableListView: TCocoaTableListView; // init will happen outside
|
||||
function AllocCocoaTableListView: TCocoaTableListView;
|
||||
begin
|
||||
// init will happen outside
|
||||
Result := TCocoaTableListView.alloc;
|
||||
Result.setRowSizeStyle( NSTableViewRowSizeStyleCustom );
|
||||
end;
|
||||
|
||||
procedure TCocoaTableRowView.drawRect(dirtyRect: NSRect);
|
||||
@ -412,6 +413,11 @@ begin
|
||||
inherited addSubview(aView);
|
||||
end;
|
||||
|
||||
procedure TCocoaTableListView.dealloc;
|
||||
begin
|
||||
FreeAndNil( _processor );
|
||||
end;
|
||||
|
||||
procedure TCocoaTableListView.lclSetProcessor( processor: TCocoaTableViewProcessor);
|
||||
begin
|
||||
_processor:= processor;
|
||||
|
Loading…
Reference in New Issue
Block a user