fix: do not leak NSUUID (#29990)

This commit is contained in:
Cheng Zhao 2021-07-05 08:45:00 +09:00 committed by GitHub
parent 0403494a6b
commit 18d0ed8155
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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