Top "Singleton" questions

A design pattern that ensures that exactly one application-wide instance of a particular class exists.

Is DocumentBuilder thread safe?

The current code base that I am looking at uses the DOM parser. The following code fragment is duplicated in 5 …

java multithreading performance dom singleton
"Singleton" factories, ok or bad?

I've a lot of (abstract) factories and they're usually implemented as singletons. Usually for the convenience of not having to …

singleton factory
Why is the Borg pattern better than the Singleton pattern in Python

Why is the Borg pattern better than the Singleton pattern? I ask because I don't see them resulting in anything …

python singleton
Are Singletons really that bad?

Possible Duplicate: What is so bad about Singletons? It's understandable that many design patterns can in some cases be abused, …

design-patterns singleton
How can a singleton class use an interface?

I read at many places that singletons can use interfaces. Some how I am unable to comprehend this.

java interface singleton class-design
Java double checked locking

I happened upon an article recently discussing the double checked locking pattern in Java and its pitfalls and now I'm …

java multithreading synchronization singleton double-checked-locking
When should EntityManagerFactory instance be created/opened?

Ok, I read bunch of articles/examples how to write Entity Manager Factory in singleton. One of them easiest for …

java jpa singleton entitymanager
ASP .NET Singleton

Just want to make sure I am not assuming something foolish here, when implementing the singleton pattern in an ASP .…

c# asp.net static singleton
Singleton in go

How does one implement the Singleton design pattern in the go programming language?

design-patterns go singleton anti-patterns
Unity singleton manager classes

In Unity, whats a good way to create a singleton game manager that can be accessed everywhere as a global …

c# design-patterns unity3d singleton