set src of videos to '' before removing from dom to work around chome bug #31014
This commit is contained in:
parent
075aac449c
commit
d2859f10ef
1 changed files with 4 additions and 1 deletions
|
@ -18,8 +18,11 @@ Ox.GarbageCollection = (function() {
|
|||
function collect() {
|
||||
var len = Ox.len(Ox.UI.elements);
|
||||
Object.keys(Ox.UI.elements).forEach(function(id) {
|
||||
var $element = Ox.UI.elements[id]
|
||||
var $element = Ox.UI.elements[id];
|
||||
if ($element && Ox.isUndefined($element.$element.data('oxid'))) {
|
||||
//Chrome does not properly release resources, reset manually
|
||||
//http://code.google.com/p/chromium/issues/detail?id=31014
|
||||
$element.find('video').attr('src', '');
|
||||
$element.remove();
|
||||
delete Ox.UI.elements[id];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue