Added SocketIOClient.removeAllHandlers
This commit is contained in:
parent
c40b7c169f
commit
5f75e6080b
@ -449,6 +449,14 @@ public final class SocketIOClient: NSObject, SocketEngineClient, SocketLogClient
|
||||
handlers.append(handler)
|
||||
}
|
||||
|
||||
/**
|
||||
Removes all handlers.
|
||||
Can be used after disconnecting to break any potential remaining retain cycles.
|
||||
*/
|
||||
public func removeAllHandlers() {
|
||||
handlers.removeAll(keepCapacity: false)
|
||||
}
|
||||
|
||||
/**
|
||||
Adds a handler that will be called on every event.
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user