Skip to content

Attempted to read an unowned reference but object ... was already deallocated #189

Description

@IAntolK

I've got a crash when was trying to write data to UDP socket:
try socket.write(from: data, to: senderAddress).
Error occurred at: Socket.swift - line 3211.
You are using unowned self which results with "Attempted to read an unowned reference but object ... was already deallocated" error if socket object is deallocated before write completes.
Possible solution would be to use [weak self].

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions