showing results for - "javascript get all instances of a class"
Gaia
12 Aug 2016
1MyClass.allInstances = [];
2MyClass.allInstances.push(this);
3//However, you need some way to figure out when to remove instances from this array, or you'll leak memory.