Last active
March 27, 2019 21:25
-
-
Save pr0zac/3e12876729fe48d3c2c2885adff9fb77 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Vault/Controllers/Wallet/WalletInfoSectionController.swift b/Vault/Controllers/Wallet/WalletInfoSectionController.swift | |
index 50ad2b8..3c91d52 100644 | |
--- a/Vault/Controllers/Wallet/WalletInfoSectionController.swift | |
+++ b/Vault/Controllers/Wallet/WalletInfoSectionController.swift | |
@@ -36,6 +36,11 @@ final class WalletInfoSectionController: FeedSectionController<WalletInfoSection | |
displayDelegate = self | |
} | |
+ deinit { | |
+ appStore.unsubscribe(self) | |
+ watcher?.cancel() | |
+ } | |
+ | |
func sectionController(_: ListBindingSectionController<ListDiffable>, viewModelsFor object: Any) -> [ListDiffable] { | |
if let object = object as? WalletInfoSectionViewModel, object.ownerAddress != updatedModel?.ownerAddress { | |
updatedModel = object | |
diff --git a/Vault/Controllers/Wallet/WalletViewController.swift b/Vault/Controllers/Wallet/WalletViewController.swift | |
index 534ad50..44dfddf 100644 | |
--- a/Vault/Controllers/Wallet/WalletViewController.swift | |
+++ b/Vault/Controllers/Wallet/WalletViewController.swift | |
@@ -58,6 +58,11 @@ class WalletViewController: VaultViewController { | |
fatalError("init(coder:) has not been implemented") | |
} | |
+ deinit { | |
+ appStore.unsubscribe(self) | |
+ graphQLWatcher?.cancel() | |
+ } | |
+ | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment