Functions

The following functions are available globally.

  • Important

    The promise is not guarenteed to resolve immediately when the provided object is deallocated. So you cannot write code that depends on exact timing.

    Declaration

    Swift

    public func afterCC(life object: NSObject) -> CancellablePromise<Void>

    Return Value

    A cancellable promise that resolves when the provided object deallocates, and can be unregistered and rejected by calling ‘cancel’