From 400bfb3c5a1aaf4e275325fb4e2d8dbc1af56a3f Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 10 Jan 2018 15:29:32 +0900 Subject: [PATCH] mac: SKProductsRequest should be freed on end --- atom/browser/mac/in_app_purchase.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/atom/browser/mac/in_app_purchase.mm b/atom/browser/mac/in_app_purchase.mm index c3ff67f462e2..4204fa509a0d 100644 --- a/atom/browser/mac/in_app_purchase.mm +++ b/atom/browser/mac/in_app_purchase.mm @@ -76,6 +76,9 @@ */ - (void)productsRequest:(SKProductsRequest*)request didReceiveResponse:(SKProductsResponse*)response { + // Release request object. + [request release]; + // Get the first product. NSArray* products = response.products; SKProduct* product = [products count] == 1 ? [products firstObject] : nil; @@ -117,6 +120,8 @@ content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, base::Bind(callback_, isProductValid)); } + // Release this delegate. + [self release]; } @end