fix: do not leak NSUUID (#30008)

* fix: do not leak NSUUID

* Fix build error

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
This commit is contained in:
trop[bot]
2021-07-05 12:52:47 -04:00
committed by GitHub
parent 0f45cd6938
commit fd09f5cd49

View File

@@ -33,7 +33,7 @@ void CocoaNotification::Show(const NotificationOptions& options) {
NSString* identifier =
[NSString stringWithFormat:@"%@:notification:%@",
[[NSBundle mainBundle] bundleIdentifier],
[[[NSUUID alloc] init] UUIDString]];
[[NSUUID UUID] UUIDString]];
[notification_ setTitle:base::SysUTF16ToNSString(options.title)];
[notification_ setSubtitle:base::SysUTF16ToNSString(options.subtitle)];