From 3cbf9f45a3a3a4d05392c55130c2472bf787303e Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Fri, 16 Aug 2019 13:54:19 -0500 Subject: [PATCH] Add weak self usage in a couple needed places --- iOS/MasterFeed/MasterFeedViewController.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/iOS/MasterFeed/MasterFeedViewController.swift b/iOS/MasterFeed/MasterFeedViewController.swift index 74fc47274..6eb954082 100644 --- a/iOS/MasterFeed/MasterFeedViewController.swift +++ b/iOS/MasterFeed/MasterFeedViewController.swift @@ -778,16 +778,16 @@ private extension MasterFeedViewController { func deleteAction(indexPath: IndexPath) -> UIAction { let title = NSLocalizedString("Delete", comment: "Delete") - let action = UIAction(title: title, image: AppAssets.trashImage) { action in - self.delete(indexPath: indexPath) + let action = UIAction(title: title, image: AppAssets.trashImage) { [weak self] action in + self?.delete(indexPath: indexPath) } return action } func renameAction(indexPath: IndexPath) -> UIAction { let title = NSLocalizedString("Rename", comment: "Rename") - let action = UIAction(title: title, image: AppAssets.editImage) { action in - self.rename(indexPath: indexPath) + let action = UIAction(title: title, image: AppAssets.editImage) { [weak self] action in + self?.rename(indexPath: indexPath) } return action }