Skip to content

Commit 55b8270

Browse files
committed
fix(stage): prevent releasing external ticker in stage cleanup
1 parent fb3e359 commit 55b8270

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/vrender-core/src/core/stage.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,10 @@ export class Stage extends Group implements IStage {
10451045
this.window.release();
10461046
this._ticker?.remTimeline(this?.timeline);
10471047
this._ticker?.removeListener('tick', this.afterTickCb);
1048-
this._ticker?.release();
1048+
if (!this.params.ticker) {
1049+
// release stage创建的ticker,避免release外部的ticker
1050+
this._ticker?.release();
1051+
}
10491052
this.renderService.renderTreeRoots = [];
10501053
}
10511054

0 commit comments

Comments
 (0)