Skip to content

Clear the associated remote media stream lists so that they can be garbage collected more eagerly #3044

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

youennf
Copy link
Contributor

@youennf youennf commented Mar 27, 2025

webrtc.html Outdated
@@ -16540,6 +16540,7 @@ <h4>
When a {{MediaStream}} is created to represent a stream obtained
from a remote peer, the {{MediaStream/id}} attribute is initialized
from information provided by the remote source.
The {{MediaStream}}'s [[\CanFireEvent]] slot is set to <code>true</code>.
Copy link
Member

Choose a reason for hiding this comment

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

As discussed at the editors meeting,
streams are held alive by
receiver.[[AssociatedRemoteMediaStreams]], so this shouldn't be needed.

We could perhaps clear that internal slot in close() to allow stream (and track) GC in that edge case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated the PR to clear the remote media streams slots at transceiver stop time.

@youennf youennf force-pushed the CanFireEvent-slot branch from b844f2e to 73cc4be Compare April 17, 2025 08:32
@youennf youennf changed the title Set MediaStream CanFireEvent slot to true Clear the associated remote media stream lists so that they can be garbage collected more eagerly Apr 17, 2025
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.

2 participants