本文整理汇总了TypeScript中@ember/runloop.run.backburner类的典型用法代码示例。如果您正苦于以下问题:TypeScript run.backburner类的具体用法?TypeScript run.backburner怎么用?TypeScript run.backburner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了run.backburner类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: unloadRecord
unloadRecord() {
if (this.isDestroyed) {
return;
}
this._destroyRelationships();
this.reset();
if (!this._scheduledDestroy) {
this._scheduledDestroy = run.backburner.schedule(
'destroy',
this,
'_cleanupOrphanedRecordDatas'
);
}
}
示例2: unloadRecord
/*
Unload the record for this internal model. This will cause the record to be
destroyed and freed up for garbage collection. It will also do a check
for cleaning up internal models.
This check is performed by first computing the set of related internal
models. If all records in this set are unloaded, then the entire set is
destroyed. Otherwise, nothing in the set is destroyed.
This means that this internal model will be freed up for garbage collection
once all models that refer to it via some relationship are also unloaded.
*/
unloadRecord() {
if (this.isDestroyed) {
return;
}
this.send('unloadRecord');
this.dematerializeRecord();
if (this._scheduledDestroy === null) {
this._scheduledDestroy = run.backburner.schedule(
'destroy',
this,
'_checkForOrphanedInternalModels'
);
}
}