Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed some memory leaking

  • Loading branch information...
commit 7ff703338d8664578a4fd6711cab2188fce7a76d 1 parent b42657d
@jussi-kalliokoski jussi-kalliokoski authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  feature-detects/workers-dataworkers.js
View
3  feature-detects/workers-dataworkers.js
@@ -11,12 +11,15 @@
worker = new Worker('data:text/javascript;base64,dGhpcy5vbm1lc3NhZ2U9ZnVuY3Rpb24oZSl7cG9zdE1lc3NhZ2UoZS5kYXRhKX0=');
worker.onmessage = function(e) {
+ worker.terminate();
Modernizr.addTest('dataworkers', data === e.data);
+ worker = null;
};
// Just in case...
worker.onerror = function() {
Modernizr.addTest('dataworkers', false);
+ worker = null;
};
setTimeout(function() {
Please sign in to comment.
Something went wrong with that request. Please try again.