From 6c3ae9ab146d086a4b512ed0b96f845c02edcd27 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sun, 23 Sep 2018 18:45:56 -0400 Subject: [PATCH] Change ComposeViewController.xcbSession to be weak --- Tusker/Screens/Compose/ComposeViewController.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tusker/Screens/Compose/ComposeViewController.swift b/Tusker/Screens/Compose/ComposeViewController.swift index a3eb3c8502..b33547d265 100644 --- a/Tusker/Screens/Compose/ComposeViewController.swift +++ b/Tusker/Screens/Compose/ComposeViewController.swift @@ -50,7 +50,8 @@ class ComposeViewController: UIViewController { var mentioningAcct: String? var text: String? - var xcbSession: XCBSession? + // Weak so that if a new session is initiated (i.e. XCBManager.currentSession is changed) while the current one is in progress, this one will be released + weak var xcbSession: XCBSession? var contentWarning = false { didSet {