LCL-Cocoa: Fix a memory leak in TCocoaWSMenu. Issue #30039, patch from lks.

git-svn-id: trunk@52232 -
This commit is contained in:
juha 2016-04-22 10:04:16 +00:00
parent 3c1f7de3ea
commit 51ac6216a6

View File

@ -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 }