-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicitly null MediaPeriod callbacks on release
If a MediaPeriod uses a Loadable, then there are typically reference chains of the form: LoadingThread[GCroot]->Loadable->MediaPeriod->Player Where the player is the MediaPeriod callback. When the player is released, this reference chain prevents the player from being GC'd until Loadable cancellation completes, which may not always be fast. This in turn will typically prevent the application's activity from being GC'd, since it'll normally be registered as a listener on the player (directly or indirectly via something like a view). This change mitigates the issue by removing references that the MediaPeriod holds back to the player. The MediaPeriod will still not be eligible for GC, but the player and application activity will be, which in most cases will be most of the leak (in terms of size). Issue: #4249 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=199143646
- Loading branch information
Showing
4 changed files
with
11 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters