Posts

Post not yet marked as solved
2 Replies
I just ran into this myself. Since previous node is a weak ref, you can start from the tail and nil the next node in your deinit to imperatively dealloc rather than let it recursively **** the stack. swift   deinit {     var cur = tail     while let node = cur {       node.next = nil       cur = cur?.prev     }   }