Hi Cory,
I understand what you mean. But the code is just an example. In the project I'm working on, the singleton is a manager, that receives instances of other classes (singletons too, by the way). Something like this:
manager.js
==
(function() {
function Manager() {
var managedInstances = [];
this.loadInstance = function(instance) {
managedInstances.push(instance);
}
}
window.myManager = new Manager();
})()
==
What you mean is that the manager shouldn't be a singleton? But there is no need to have more than an instance of it...