Skip to content
This repository has been archived by the owner on Oct 14, 2021. It is now read-only.

Commit

Permalink
Document Subscription's unsubscribe.
Browse files Browse the repository at this point in the history
Summary: Closes #5

Reviewers: O2 Material Motion, #material_motion, O4 Material Apple platform reviewers, chuga

Reviewed By: O4 Material Apple platform reviewers, chuga

Tags: #material_motion

Differential Revision: http://codereview.cc/D2272
  • Loading branch information
Jeff Verkoeyen committed Dec 13, 2016
1 parent eb8abdf commit 75ec811
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/IndefiniteObservable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ public final class Subscription {
self.disconnect = disconnect
}

/**
Unsubscribing will disconnect all observables from their sources.

Invoked automatically on deallocation.
*/
public func unsubscribe() {
disconnect?()
disconnect = nil
Expand Down

0 comments on commit 75ec811

Please sign in to comment.