Skip to content

Commit

Permalink
fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
vegaro committed Sep 25, 2024
1 parent 3c47473 commit aeee257
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/Purchasing/Purchases/PurchasesOrchestrator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,9 @@ final class PurchasesOrchestrator {

let addPayment: Bool = self.addPurchaseCompletedCallback(
productIdentifier: productIdentifier,
completion: { transaction, customerInfo, error, cancelled in
completion: { [weak self] transaction, customerInfo, error, cancelled in
guard let self = self else { return }

if !cancelled {
self.trackPurchaseEventIfNeeded(storeKitVersion: .storeKit1, error: error)
if let error = error {
Expand Down

0 comments on commit aeee257

Please sign in to comment.