Skip to content

Commit

Permalink
UIComponent: clear stoppedTimers in animationFrame
Browse files Browse the repository at this point in the history
Otherwise, this Set will grow in size infinitely, potentially causing
performance and memory issues.

GitHub: #133
Linear: EM-2325
  • Loading branch information
DJtheRedstoner authored Feb 16, 2024
1 parent f4fa7f9 commit d10bb13
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/kotlin/gg/essential/elementa/UIComponent.kt
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,7 @@ abstract class UIComponent : Observable(), ReferenceHolder {
}

stoppedTimers.forEach { activeTimers.remove(it) }
stoppedTimers.clear()
}

open fun alwaysDrawChildren(): Boolean {
Expand Down

0 comments on commit d10bb13

Please sign in to comment.