Created
September 12, 2017 07:23
-
-
Save Otbivnoe/a8fe8aacab888719028e00facd57cff6 to your computer and use it in GitHub Desktop.
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
| let disposable1 = Disposables.create { print("disposed-1 ☠️") } | |
| let disposable2 = Disposables.create { print("disposed-2 ☠️") } | |
| let singleAssignmentDisposable = SingleAssignmentDisposable() | |
| print("set disposable1") | |
| singleAssignmentDisposable.setDisposable(disposable1) | |
| print("set disposable2") | |
| singleAssignmentDisposable.setDisposable(disposable2) // ⚠️⚠️⚠️ fatal error | |
| print("dispose") | |
| singleAssignmentDisposable.dispose() | |
| // log: | |
| // set disposable1 | |
| // set disposable2 | |
| // ⚠️⚠️⚠️ fatal error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment