Skip to content

Instantly share code, notes, and snippets.

@Otbivnoe
Created September 12, 2017 07:02
Show Gist options
  • Select an option

  • Save Otbivnoe/138c04bdaa1d922b1d358957afbb08d2 to your computer and use it in GitHub Desktop.

Select an option

Save Otbivnoe/138c04bdaa1d922b1d358957afbb08d2 to your computer and use it in GitHub Desktop.
let disposable1 = Disposables.create { print("disposed-1 ☠️") }
let disposable2 = Disposables.create { print("disposed-2 ☠️") }
let binaryDisposable = Disposables.create(disposable1, disposable2)
print("dispose")
binaryDisposable.dispose()
// log:
// dispose
// disposed-1 ☠️
// disposed-2 ☠️
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment