From 32e0e8a1518db32e8df4edac6d931fd719523e7b Mon Sep 17 00:00:00 2001 From: Charlie Hess Date: Thu, 8 Sep 2016 16:23:55 -0700 Subject: [PATCH] Use smart pointers in a couple places. --- atom/browser/atom_browser_main_parts.cc | 2 +- atom/browser/mac/atom_application_delegate.mm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/atom/browser/atom_browser_main_parts.cc b/atom/browser/atom_browser_main_parts.cc index 00461a49fae4..e160eb7c0ce1 100644 --- a/atom/browser/atom_browser_main_parts.cc +++ b/atom/browser/atom_browser_main_parts.cc @@ -156,7 +156,7 @@ void AtomBrowserMainParts::PreMainMessageLoopRun() { #if !defined(OS_MACOSX) // The corresponding call in macOS is in AtomApplicationDelegate. Browser::Get()->WillFinishLaunching(); - base::DictionaryValue* empty_info = new base::DictionaryValue(); + std::unique_ptr empty_info(new base::DictionaryValue); Browser::Get()->DidFinishLaunching(*empty_info); #endif } diff --git a/atom/browser/mac/atom_application_delegate.mm b/atom/browser/mac/atom_application_delegate.mm index 4fcbc012bd15..4c6a938fba59 100644 --- a/atom/browser/mac/atom_application_delegate.mm +++ b/atom/browser/mac/atom_application_delegate.mm @@ -32,8 +32,8 @@ atom::NSDictionaryToDictionaryValue(user_notification.userInfo); atom::Browser::Get()->DidFinishLaunching(*launch_info); } else { - base::DictionaryValue* launch_info = new base::DictionaryValue(); - atom::Browser::Get()->DidFinishLaunching(*launch_info); + std::unique_ptr empty_info(new base::DictionaryValue); + atom::Browser::Get()->DidFinishLaunching(*empty_info); } }