mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-04 10:17:11 +01:00
LCL-Cocoa: Fix a memory leak in TCocoaWSMenu. Issue #30039, patch from lks.
git-svn-id: trunk@52232 -
This commit is contained in:
parent
3c1f7de3ea
commit
51ac6216a6
@ -282,9 +282,13 @@ end;
|
||||
Creates new menu in Cocoa interface
|
||||
------------------------------------------------------------------------------}
|
||||
class function TCocoaWSMenu.CreateHandle(const AMenu: TMenu): HMENU;
|
||||
var
|
||||
ns: NSString;
|
||||
begin
|
||||
//WriteLn(':>[TCocoaWSMenu.CreateHandle]');
|
||||
Result := HMENU(TCocoaMenu.alloc.initWithTitle(NSStringUtf8('')));
|
||||
ns := NSStringUtf8('');
|
||||
Result := HMENU(TCocoaMenu.alloc.initWithTitle(ns));
|
||||
ns.release;
|
||||
end;
|
||||
|
||||
{ TCocoaWSMainMenu }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user