So i am trying to export somethings in a project to DLL. Anyways a few of the projects use a singleton class very heavily.
I have an underlying class which I want to place in some code.I only want it to be instantiated or started once for a given app although it might be called many times..The problem with the code below
So I\'m working on a middleware layer. I\'m consuming a COM DLL that deals with the low level hardware interaction, and providing an interface for the UI to do IO with the hardware.
So there\'s this so-called module pattern for creating singletons with private members: var foo = (function () {
I\'m currently using a singleton on my web application so that there is always only one connection to the database.