diff --git a/atom/browser/mac/in_app_purchase_observer.mm b/atom/browser/mac/in_app_purchase_observer.mm index 379f405c2b3..47e35e22e73 100644 --- a/atom/browser/mac/in_app_purchase_observer.mm +++ b/atom/browser/mac/in_app_purchase_observer.mm @@ -50,6 +50,14 @@ using InAppTransactionCallback = return self; } +/** + * Cleanup. + */ +- (void)dealloc { + [[SKPaymentQueue defaultQueue] removeTransactionObserver:self]; + [super dealloc]; +} + /** * Run the callback in the browser thread. *