fix: submenu should be autoreleased (#25617)
This commit is contained in:
parent
01dc50d829
commit
d2282ac51a
1 changed files with 1 additions and 1 deletions
|
@ -297,7 +297,7 @@ static base::scoped_nsobject<NSMenu> recentDocumentsMenuSwap_;
|
|||
|
||||
[item setTarget:nil];
|
||||
[item setAction:nil];
|
||||
NSMenu* submenu = [[NSMenu alloc] initWithTitle:label];
|
||||
NSMenu* submenu = [[[NSMenu alloc] initWithTitle:label] autorelease];
|
||||
[item setSubmenu:submenu];
|
||||
[NSApp setServicesMenu:submenu];
|
||||
} else if (type == electron::ElectronMenuModel::TYPE_SUBMENU &&
|
||||
|
|
Loading…
Reference in a new issue