Skip to content

fix: resolve memory leak by adding proper event listener and timer cl…#208

Open
sangjiexun wants to merge 1 commit intoStreamedian:masterfrom
sangjiexun:fix-memory-leak
Open

fix: resolve memory leak by adding proper event listener and timer cl…#208
sangjiexun wants to merge 1 commit intoStreamedian:masterfrom
sangjiexun:fix-memory-leak

Conversation

@sangjiexun
Copy link
Copy Markdown

@sangjiexun sangjiexun commented Mar 19, 2026

…eanup

  • player.js: Store bound handlers and remove all event listeners in destroy()
  • base_client.js: Call stopStreamFlush() in destroy() to clear timers
  • mse.js: Remove sourceopen/sourceended/sourceclose listeners in destroy()
  • MSEBuffer: Add null check for sourceBuffer before removal
    --------------------------------------------------------------------------------------
  • player.js:存储绑定的处理函数,并在 destroy() 方法中移除所有事件监听器
  • base_client.js:在 destroy() 中调用 stopStreamFlush() 以清除定时器
  • mse.js:在 destroy() 中移除 sourceopen、sourceended、sourceclose 事件监听器
  • MSEBuffer:在移除前对 sourceBuffer 增加空值判断

…eanup

- player.js: Store bound handlers and remove all event listeners in destroy()
- base_client.js: Call stopStreamFlush() in destroy() to clear timers
- mse.js: Remove sourceopen/sourceended/sourceclose listeners in destroy()
- MSEBuffer: Add null check for sourceBuffer before removal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant