Sep 15, 2024
Never do this...
Task { [weak self] in
guard let self else { return }
...
}
Since the task will execute almost immediately, the weak self is immediately unpacked and as such accomplishes nothing.
Task closures are not completion handlers.