本文整理汇总了TypeScript中atom.CompositeDisposable.dispose方法的典型用法代码示例。如果您正苦于以下问题:TypeScript CompositeDisposable.dispose方法的具体用法?TypeScript CompositeDisposable.dispose怎么用?TypeScript CompositeDisposable.dispose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类atom.CompositeDisposable
的用法示例。
在下文中一共展示了CompositeDisposable.dispose方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: onDeactivate
export function onDeactivate() {
// 1. remove window listener
window.onresize = null;
// 2. unmount React
unmount();
// 3. cleanup subscriptions
subscriptions.dispose();
}
示例2: deactivate
export function deactivate() {
process && process.destroy()
process = undefined
completionBackend = undefined
disposables && disposables.dispose()
disposables = undefined
tempDisposables = undefined
}
示例3: consumeUPI
export function consumeUPI(service: UPI.IUPIRegistration) {
if (!process || !disposables) { return undefined }
tempDisposables && tempDisposables.dispose()
tempDisposables = undefined
const upiConsumer = new UPIConsumer(service, process)
resolveUpiPromise(upiConsumer.upi)
disposables.add(upiConsumer)
return upiConsumer
}
示例4: deactivate
export function deactivate() {
subscriptions.dispose()
}
示例5: dispose
public dispose() {
this.subscriptions.dispose()
}
示例6: destroy
public destroy() {
this.disposables.dispose()
}
示例7: destroy
public destroy() {
this.backend.destroy()
this.emitter.emit('did-destroy')
this.disposables.dispose()
}
示例8: debug
this.proc.once('exit', (code) => {
this.timer && window.clearTimeout(this.timer)
debug(`hsdev ended with ${code}`)
this.emitter.emit('did-exit', code)
this.disposables.dispose()
})