You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
( bin/modify-dash.js will modify FactoryMaker.js, adding two console log lines that make it easier to see the issue. )
Then open http://localhost:3000/ and open your dev console. Press the "Recreate" button. This will call reset() on the current media player and then create a new one.
You will see in the console that I am printing the length of singletonContexts from FactoryMaker.js. The count just keeps going up and up, even though I reset my media players before I stop using them, and there is no longer any reference to previous players.
I believe this clearly shows the leak in FactoryMaker.js. It retains the 'context' for every MediaPlayer ever created. This context indirectly references many other objects, including the HTMLVideoElement that was used. On my site I create & delete MediaPlayers quite frequently (every 5-10 seconds) and our users have reported that their browsers eventually crash.
The text was updated successfully, but these errors were encountered:
Environment
Steps to reproduce
See the Leak in Devtools
The above steps will reproduce the leak but you have to look in chrome dev tools at the memory tab. You'll see something like this:
Notice that it looks like
getSingletonInstance
is retaining a reference indirectly to a VideoTrackList which will retain the HTMLVideoElement as well.See the Leak more Easily
I created another way to see the leak here: https://github.com/ahfarmer/dash-mem-leak
Run these commands:
(
bin/modify-dash.js
will modifyFactoryMaker.js
, adding two console log lines that make it easier to see the issue. )Then open http://localhost:3000/ and open your dev console. Press the "Recreate" button. This will call
reset()
on the current media player and then create a new one.You will see in the console that I am printing the length of
singletonContexts
fromFactoryMaker.js
. The count just keeps going up and up, even though I reset my media players before I stop using them, and there is no longer any reference to previous players.I believe this clearly shows the leak in
FactoryMaker.js
. It retains the 'context' for every MediaPlayer ever created. This context indirectly references many other objects, including the HTMLVideoElement that was used. On my site I create & delete MediaPlayers quite frequently (every 5-10 seconds) and our users have reported that their browsers eventually crash.The text was updated successfully, but these errors were encountered: