Singleton design pattern

Which option would be chosen to create only one object of a class
a) Singleton pattern ( make the constructor private and static method as public )
OR
b) with the help of global variable (is it possible?)

Singleton is a really a design pattern or it is a monolithic solution?
I use singletons a lot.

For instance, I may write programs where I only want on instance of a renderer. Singletons are great for that sort of thing.

CoolTech wrote:
b) with the help of global variable (is it possible?)

This is never the answer.
Topic archived. No new replies allowed.