mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-18 14:22:19 +02:00
[Bug][Performance] Plug memory leak related to enemy pokemon lingering around (#6083)
Remove animationupdate in sprite cleanupAndComplete
This commit is contained in:
parent
ca4df7233f
commit
edbba6e635
@ -880,6 +880,10 @@ export abstract class BattleAnim {
|
||||
targetSprite.pipelineData["tone"] = [0.0, 0.0, 0.0, 0.0];
|
||||
targetSprite.setAngle(0);
|
||||
|
||||
// Remove animation event listeners to enable sprites to be freed.
|
||||
userSprite.off("animationupdate");
|
||||
targetSprite.off("animationupdate");
|
||||
|
||||
/**
|
||||
* This and `targetSpriteToShow` are used to restore context lost
|
||||
* from the `isOppAnim` swap. Using these references instead of `this.user`
|
||||
|
Loading…
Reference in New Issue
Block a user