Jump to content
  • Advertisement
  • entries
  • comments
  • views

Nasty Singletons

Sign in to follow this  


I stumbled across a 'debate' on Singleton Managers which sparked my interest.

After reading Enginuity I was a huge fan of the Singleton 'pattern' as it allowed me to circumvent the whole notion of OOP and access my data from everywhere. Unsuprisingly, I used it everywhere and in every way I possibly could because I thought it was 'neat'. It started out with my logger and eventually crept into every class I had that had any kind of management responsibility. Before I knew it everything was accessing everything else and my seemingly simple systems were so tied into one another that even a minor change would take hours to implement. It was, quite simply, a nightmare.

I'm not going to join this whole debate as I believe there's a time and a place for everything, but please please please, if you're going to use a Singleton then at least know WHY you're going to use it and be aware of the issues that you could create for yourself by misdesigning the system.
Sign in to follow this  


Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!