-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
To workaround the memory leak issue, an another idea could be to implement the famous pattern of Disposable
and Disposer
// MARK: - Disposable declaration
public protocol Disposable {
func dispose()
}
// MARK: - Disposable
extension Each: Disposable {
public func dispose() {
stop()
}
}
// MARK: - Disposer declaration
public protocol Disposer {
func add(_ disposable: Disposable)
func dispose()
}