There is a subtle change in the latest template update. The variables
presenter are now declared as real optionals using
?. (They were forced unwrapped optionals with
class CreateOrderViewController: CreateOrderDisplayLogic
var interactor: CreateOrderBusinessLogic?
class CreateOrderInteractor: CreateOrderBusinessLogic
var presenter: CreateOrderPresentationLogic?
class CreateOrderPresenter: CreateOrderPresentationLogic
var viewController: CreateOrderDisplayLogic?
There was a situation where it could cause a crash if
presenter is deallocated and a method is invoked on it.
This happens when the interactor does some asynchronous work. Before it can finish, the user has navigated away (such as tapping the back button) from the current scene.