class NetworkManager {
var data = "Payload"
func fetchData(completion: @escaping () -> Void) {
// Simulating an action where this manager instance is guaranteed to be alive
DispatchQueue.global().async {
completion()
}
}
func startTasks() {
fetchData { [unowned self] in
// No optional unwrapping or 'self?' required
print("Successfully processed \(self.data)")
}
}
}
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)