1
General / Re: Exception raised on exit. Using singleton with SFML 2.0.
« on: April 13, 2013, 02:30:58 pm »
Thanks eXpl0it3er and Nexus for your advice. I've been using Singletons to speed up the game development process. I realize it's a bad practice, but for the small projects I'm involved in it usually works. Anyway I think now I feel comfortable enough with C++ to find better designs...
Sorry, I didn't want to take it as an example of you being supporter of the Singleton pattern. I just wanted to point out that the destroyInstance() in the singleton with global instance was already known in the forums
Thanks! I take your word
But first I'll think about:
So far I've found a gold mine! Don't focus on the topic title, but the links there posted. I think the message bus approach can fit my project and will considerably reduce the dependency tree!
Quote from: Nexus
Don't quote it out of context. If you search my other posts, you'll find my actual opinion about singletons and global variables.
Sorry, I didn't want to take it as an example of you being supporter of the Singleton pattern. I just wanted to point out that the destroyInstance() in the singleton with global instance was already known in the forums
Quote from: Nexus
If you need input on how to design your code in a better way, don't hesitate to ask.
Thanks! I take your word
But first I'll think about:
- What components of my code use Singletons
- How do implement such components without using Singletons
So far I've found a gold mine! Don't focus on the topic title, but the links there posted. I think the message bus approach can fit my project and will considerably reduce the dependency tree!