You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 14, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+53Lines changed: 53 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,56 @@
1
+
# 4.0.0
2
+
3
+
This major release improves the general usage of the observable pattern by removing the
4
+
auto-unsubscription behavior from the Subscription type on deallocation.
5
+
6
+
```swift
7
+
// Pre-4.0 usage required that you held on to the Subscription instance in order to continue
8
+
// receiving values
9
+
let subscription = observable.subscribe { value in
10
+
print(value)
11
+
}
12
+
13
+
// 4.0 allows you to subscribe to streams without holding on to the Subscription instance.
14
+
observable.subscribe { value in
15
+
print(value)
16
+
}
17
+
```
18
+
19
+
## Breaking changes
20
+
21
+
• Subscriptions no longer unsubscribe automatically upon deallocation.
22
+
23
+
This means that you no longer need to hold on to a Subscription in order to continue receiving
24
+
values from a subscribed stream.
25
+
26
+
If you were previously depending on this behavior then you must now ensure that you explicitly
27
+
unsubscribe from subscriptions.
28
+
29
+
## Source changes
30
+
31
+
*[[breaking] Remove automatic unsubscription from the Subscription object.](https://github.com/material-motion/indefinite-observable-swift/commit/8f5b89cf26bb4e0d26eca254419741278a290ec8) (Jeff Verkoeyen)
32
+
33
+
## API changes
34
+
35
+
Auto-generated by running:
36
+
37
+
apidiff origin/stable release-candidate swift IndefiniteObservable.xcworkspace IndefiniteObservable
38
+
39
+
## Subscription
40
+
41
+
## IndefiniteObservable
42
+
43
+
*modified* method: `subscribe(observer:)` in `IndefiniteObservable`
*[Update README with new documentation for subscriptions.](https://github.com/material-motion/indefinite-observable-swift/commit/a492076d65aa9540737ac845fb1380c46cf53a9b) (Jeff Verkoeyen)
0 commit comments