Created
September 4, 2016 20:06
-
-
Save lizixroy/f8664cf8cfb3334bf97d9b4a747fa8b7 to your computer and use it in GitHub Desktop.
RxSwift-article-12.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct SubscriptionDisposable<T: SynchronizedUnsubscribeType> : Disposable { | |
private let _key: T.DisposeKey | |
private weak var _owner: T? | |
init(owner: T, key: T.DisposeKey) { | |
_owner = owner | |
_key = key | |
} | |
func dispose() { | |
_owner?.synchronizedUnsubscribe(_key) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment