For those considering singtletons you should probably read the following three journal entries by the great Washu;
clicky 1
clicky 2
clicky 3
Singleton design pattern
Quote:Original post by _the_phantom_
For those considering singtletons you should probably read the following three journal entries by the great Washu;
clicky 1
clicky 2
clicky 3
I don't think that's what you meant to post. Here's my attempt
Why are you infected with Singletonitis?
Singletonitis, Part 2
Singletonitis, Part 3
They're an interesting read, thanks for pointing them out.
CM
I've seen one good use of singleton, a texture manager. No matter if you're running two or more "game applications" within your game app or whatever. The computer still only needs to load a texture once, there's no point in two instances (running in the same .exe though) to have the same texture loaded twice into memory.
Although, this would probably be better implemented as a Monostate behind some actual object such as the Render Core (renderCore::getTexture(name) would be a nice place to hide it). Of course, this would only be usefull if you have 2+ RenderCore's running at the same time.
*me goes reading Washus journal*
ps. oddly how I just ranted about singletons before seeing this post... ds.
Although, this would probably be better implemented as a Monostate behind some actual object such as the Render Core (renderCore::getTexture(name) would be a nice place to hide it). Of course, this would only be usefull if you have 2+ RenderCore's running at the same time.
*me goes reading Washus journal*
ps. oddly how I just ranted about singletons before seeing this post... ds.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement