Browse Source

fix: do not leak NSUUID (#30007)

* fix: do not leak NSUUID

* Fix build error

Co-authored-by: Cheng Zhao <[email protected]>
trop[bot] 3 years ago
parent
commit
c6e2cca8bc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      shell/browser/notifications/mac/cocoa_notification.mm

+ 1 - 1
shell/browser/notifications/mac/cocoa_notification.mm

@@ -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)];