You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
session-ios/SessionUtilitiesKit/AnyPromise+Retaining.swift

14 lines
250 B
Swift

import PromiseKit
public extension AnyPromise {
@objc
func retainUntilComplete() {
var retainCycle: AnyPromise? = self
_ = self.ensure {
assert(retainCycle != nil)
retainCycle = nil
}
}
}