             .autodispose(in: apool)
         
         view.didAdd
-            .subscribe {
+            .subscribe { [unowned self] in
                 let item = Item(id: UUID().uuidString, title: $0, completed: false)
                 self.storeItems.append(item)
                 self.undoStack.append(self.storeItems.value)

            .autodispose(in: apool)
        
        view.didToggle
            .subscribe {
                var item = self.storeItems.value[$0.0]
                item.completed = $0.1
                self.storeItems.update(at: $0.0, with: item)

        view.undoEnabled = undoStack.count > 1
    }
    
    deinit {
        print("deinit")
    }
    
    init(view: ListViewProtocol, storeItems: MutableArrayProperty<Item> ) {
        self.view = view
        self.storeItems = storeItems
