fix: prevent memory leaks on consecutive fight replays
- FightViewer: store canvas event handlers and remove them before replacing canvas elements, preventing detached DOM/closure leaks - FightViewer: clean up canvas listeners on unmount - tts.ts: clear _staticLoading dedup map after precache completes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
aa263ec8ae
commit
854b1cd1df
@@ -358,6 +358,8 @@ async function _precacheCommon() {
|
||||
}
|
||||
_precacheDone = true
|
||||
_precacheRunning = false
|
||||
// Release dedup promises — they hold closures referencing fetch/decode state
|
||||
_staticLoading.clear()
|
||||
}
|
||||
|
||||
function _cacheKey(text: string, profile: string): string {
|
||||
|
||||
Reference in New Issue
Block a user