Last active
February 11, 2016 07:42
-
-
Save MattiasFestin/42a792d83ebd187c87f7 to your computer and use it in GitHub Desktop.
memmory safe AbstractManager
This file contains hidden or 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
//Dependency: https://gist.github.com/MattiasFestin/e5e92d5ae5e2b4bf89c3 | |
Ext.override('Ext.AbstractManager', { | |
constructor: function(config) { | |
Ext.apply(this, config || {}); | |
/** | |
* @property {Ext.util.HashMap} all | |
* Contains all of the items currently managed | |
*/ | |
if (typeof window.WeakMap === 'function') { | |
this.all = new Ext.util.WeakHashMap(); | |
} else { | |
//Fallback | |
this.all = new Ext.util.HashMap(); | |
} | |
this.types = {}; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment