I've run into a very illusive problem using a singleton in one of my programs. It appears that the singleton is being "destroyed." When it is referenced, a null reference exception is generated. To validate that this is actually what was going on, I temporarily changed the code so I could create individual instances of the class. When I did that, there was never a null reference exception.
Even more strange, this does not happen on all computers. The problem first became apparently when the software was installed on a client's note book. This particular machine is working on vista, thought our DEV machines are on vista we are not able to have this problem. And I see the same problem occuring in all Windows 7 machines. Initially, it had all the security features enabled and some virus protection. I disabled all of that, but the problem still persisted.
Does anyone have any ideas on what might be causing this? The code is posted below. Thanks for the assistance everyone.
/// Singleton class that provides a facility to create
/// (highly probable) globally unique row values.
View Complete Post