Skip to content

fix: resolve memory leak in MediaRecorder event listeners#1077

Merged
Spiral-Memory merged 3 commits intoRocketChat:developfrom
deepak0x:fix/media-recorder-leak
Mar 21, 2026
Merged

fix: resolve memory leak in MediaRecorder event listeners#1077
Spiral-Memory merged 3 commits intoRocketChat:developfrom
deepak0x:fix/media-recorder-leak

Conversation

@deepak0x
Copy link
Copy Markdown
Contributor

@deepak0x deepak0x commented Jan 17, 2026

This PR fixes a memory leak in the useMediaRecorder and useNewMediaRecorder hooks where event listeners attached to MediaRecorder instances were never removed, causing unused recorder instances to remain in memory after each recording session.

Closes #1073

Video/Screenshots

PR Test Details

Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-1077 after approval. Contributors are requested to replace <pr_number> with the actual PR number.

Copy link
Copy Markdown
Collaborator

@Spiral-Memory Spiral-Memory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Spiral-Memory Spiral-Memory merged commit 631be79 into RocketChat:develop Mar 21, 2026
4 checks passed
github-actions bot added a commit that referenced this pull request Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore a subtle fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Event Listener Memory Leak in useMediaRecorder Hook

2 participants