Skip to content

fix(DASH): Prevent memory leak in uncompiled mode #8884

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

Merged
merged 1 commit into from
Jul 17, 2025

Conversation

tykus160
Copy link
Member

Keeping this references in DASH uri callbacks leads to keeping DashParser instances in memory after unloading.
Luckily this is only the issue in uncompiled mode, Closure Compiler handles it somehow. It is though better to fix it in case we change tooling some day.

@tykus160 tykus160 added this to the v4.16 milestone Jul 17, 2025
@tykus160 tykus160 added type: bug Something isn't working correctly priority: P3 Useful but not urgent component: DASH The issue involves the MPEG DASH manifest format labels Jul 17, 2025
@shaka-bot
Copy link
Collaborator

Incremental code coverage: 100.00%

@avelad avelad merged commit 27163ff into shaka-project:main Jul 17, 2025
50 of 53 checks passed
@joeyparrish
Copy link
Member

I think the compiler often does the same or similar optimizations to this PR (lifting things out of "this" into local variables). But it does that mainly to make the binary smaller, rather than because of memory, so it's definitely good to solve this directly.

@tykus160 tykus160 deleted the wt-dash-memleak-uncompiled branch July 18, 2025 08:56
tykus160 added a commit that referenced this pull request Jul 18, 2025
avelad pushed a commit that referenced this pull request Jul 21, 2025
Keeping `this` references in DASH uri callbacks leads to keeping
DashParser instances in memory after unloading.
Luckily this is only the issue in uncompiled mode, Closure Compiler
handles it somehow. It is though better to fix it in case we change
tooling some day.
avelad pushed a commit that referenced this pull request Jul 21, 2025
avelad pushed a commit that referenced this pull request Jul 21, 2025
Keeping `this` references in DASH uri callbacks leads to keeping
DashParser instances in memory after unloading.
Luckily this is only the issue in uncompiled mode, Closure Compiler
handles it somehow. It is though better to fix it in case we change
tooling some day.
avelad pushed a commit that referenced this pull request Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: DASH The issue involves the MPEG DASH manifest format priority: P3 Useful but not urgent type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants