Subscription

This chapter describes the Subscription interface. It represents a handle to a subscribed callback, and can be used to unsubscribe from it without having a reference to the interface used to subscribe to the callback.

Lifetime

The lifetime of a subscription starts when an object of type ISubscription is created, which can be done through the Subscribe… methods part of several interfaces. A list of all such methods is described below. Subscriptions are released when they are no longer referenced and are garbage collected (for C#), or by letting all shares pointers go out of scope (for C++). In both cases associated callbacks are automatically unsubscribed.