Edit: From another question I provided an answer that has links to a lot of questions/answers about singletons: More info about singletons here:
So I have read th
The first example isn't thread safe - if two threads call getInstance at the same time, that static is going to be a PITA. Some form of mutex would help.