mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 16:00:59 +02:00
Cocoa: BeginMessageProcess/EndMessageProcess implemented, fix resources leak
This commit is contained in:
parent
2d1027253f
commit
7f00662152
@ -201,6 +201,9 @@ type
|
|||||||
procedure AppSetIcon(const Small, Big: HICON); override;
|
procedure AppSetIcon(const Small, Big: HICON); override;
|
||||||
procedure AppSetTitle(const ATitle: string); override;
|
procedure AppSetTitle(const ATitle: string); override;
|
||||||
|
|
||||||
|
function BeginMessageProcess: TLCLHandle; override;
|
||||||
|
procedure EndMessageProcess(context: TLCLHandle); override;
|
||||||
|
|
||||||
function GetLCLCapability(ACapability: TLCLCapability): PtrUInt; override;
|
function GetLCLCapability(ACapability: TLCLCapability): PtrUInt; override;
|
||||||
|
|
||||||
function CreateTimer(Interval: integer; TimerFunc: TWSTimerProc): TLCLHandle; override;
|
function CreateTimer(Interval: integer; TimerFunc: TWSTimerProc): TLCLHandle; override;
|
||||||
|
@ -124,6 +124,17 @@ begin
|
|||||||
AppRunMessages(true, NSDate.distantFuture);
|
AppRunMessages(true, NSDate.distantFuture);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TCocoaWidgetSet.BeginMessageProcess: TLCLHandle;
|
||||||
|
begin
|
||||||
|
Result := TLCLHandle(NSAutoreleasePool.alloc.init);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCocoaWidgetSet.EndMessageProcess(context: TLCLHandle);
|
||||||
|
begin
|
||||||
|
NSAutoreleasePool(context).release;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TCocoaWidgetSet.Create
|
Method: TCocoaWidgetSet.Create
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user