Skip to content

Instantly share code, notes, and snippets.

@MattiasFestin
Last active February 11, 2016 07:42
Show Gist options
  • Save MattiasFestin/42a792d83ebd187c87f7 to your computer and use it in GitHub Desktop.
Save MattiasFestin/42a792d83ebd187c87f7 to your computer and use it in GitHub Desktop.
memmory safe AbstractManager
//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