Skip to content

Commit

Permalink
fix memory leak (cocos#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinYunMo committed Nov 25, 2022
1 parent 0bf5a96 commit 59b4969
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cocos/new-ui/rendering/ui-batch-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ export class UIBatchBuilder {
this._contextModel.enabled = false;
this.buildBatchRecursively(rootProxy);
this._fillModel();
this._bufferAccessor.forEach(
(value) => {
value.bufferPool.reset();
},
);
const stamp = legacyCC.director.getTotalFrames();
this._contextModel.updateUBOs(stamp);
}
Expand Down

0 comments on commit 59b4969

Please sign in to comment.