本文整理匯總了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()
})