Skip to content

Commit

Permalink
Recycle nextData and previousOldData back into the objectPool upon co…
Browse files Browse the repository at this point in the history
…mponent destroy (#5458)

Co-authored-by: Noeri Huisman <mrxz@users.noreply.github.com>
  • Loading branch information
mrxz and mrxz authored Feb 12, 2024
1 parent 18b25a0 commit 6b49fb5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,9 +578,11 @@ Component.prototype = {
*/
destroy: function () {
this.objectPool.recycle(this.attrValue);
this.objectPool.recycle(this.nextData);
this.objectPool.recycle(this.oldData);
this.objectPool.recycle(this.previousOldData);
this.objectPool.recycle(this.parsingAttrValue);
this.attrValue = this.oldData = this.parsingAttrValue = undefined;
this.nextData = this.attrValue = this.oldData = this.previousOldData = this.parsingAttrValue = undefined;
}
};

Expand Down

0 comments on commit 6b49fb5

Please sign in to comment.