Skip to content

Commit

Permalink
Fix that assets in scene configured with autorelease could not be a…
Browse files Browse the repository at this point in the history
…uto released after switching scene. It's a memory leak from v3.8.1. (#17993)
  • Loading branch information
dumganhar authored Dec 2, 2024
1 parent 5ffedf8 commit 2aafef2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cocos/scene-graph/node.jsb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1171,6 +1171,14 @@ Object.defineProperty(nodeProto, 'scene', {
}
});

Object.defineProperty(nodeProto, 'id', {
configurable: true,
enumerable: true,
set(id) {
this._id = id;
}
});

nodeProto.rotate = function (rot: Quat, ns?: NodeSpace): void {
_tempFloatArray[1] = rot.x;
_tempFloatArray[2] = rot.y;
Expand Down

0 comments on commit 2aafef2

Please sign in to comment.