The singleton tag has no wiki summary.
3
votes
3answers
245 views
Is the singleton pattern prone to thread safety problems?
Is the singleton pattern prone to thread safety problems? If so, what are the best methods to work around them?
0
votes
0answers
57 views
Singletons in C++, are they really necessary, used? [closed]
Possible Duplicate:
When is Singleton appropriate?
Ok, most people probably know what a singleton is, use them, and know all the drawbacks including race conditions and so on.
But what I ...
0
votes
2answers
90 views
Template rendering engine legitimate use of a singleton?
I wrote a standalone singleton class (scaffold) tonight that serves as a facade to a few other classes, including a template class and a view class. Templates and views are both named and instances ...
0
votes
5answers
278 views
Does “Property” in C# cost much?
I have a class created in some namespace, like SomeNameSpace.SubNameSpace.StaticClassName
Here is a code snippet from other code file where I want to use this class many more times, so I created a ...
-1
votes
1answer
166 views
What is the difference between class level attributes, Class constants and singleton methods?
What the difference given they all exist 'once per class'.
When should I use one over another, i.e. for what purpose?
I use Ruby.
1
vote
1answer
317 views
const vs. readonly for a singleton
First off, I understand there are folk who oppose the use of singletons. I think it's an appropriate use in this case as it's constant state information, but I'm open to differing opinions / ...
14
votes
9answers
813 views
Alternatives to the singleton pattern
I have read different opinions about the singleton pattern.
Some maintain that it should be avoided at all costs and others
that it can be be useful in certain situations.
One situation in which I ...
10
votes
7answers
1k views
What are the roles of singletons, abstract classes and interfaces?
I am studying OOP in C++ and, even though I am aware of the definitions of these 3 concepts, I cannot really realize when or how to use it.
Let's use this class for the example:
class Person{
...
5
votes
4answers
274 views
C++ - Best way to have a central data repository
I'm coding in C++. I have a server that will have clients connect to it, and each client gets spun off into its own thread for communication. This server is hosting a game, so there is information ...
4
votes
1answer
333 views
DAO/Webservice Consumption in Web Application
I am currently working on converting a "legacy" web-based (Coldfusion) application from single data source (MSSQL database) to multi-tier OOP.
In my current system there is a read/write database with ...
2
votes
3answers
1k views
Static class vs Singleton class in C# [closed]
Possible Duplicate:
What is the difference between all-static-methods and applying a singleton pattern?
I need to make a decision for a project I'm working of whether to use static or ...
7
votes
4answers
891 views
Dependency Injection and Singleton. Are they two entirely different concepts?
I've been hearing about using the dependency injection over Singleton for my colleague. I still can't make out if it they are two orthogonal patterns which can be replaced with one another? Or is DI a ...
1
vote
3answers
161 views
Memory problems with singletons in a test suite
I am having a memory leak when running a test suite due to singleton objects are created and not cleared after each test case. And these singleton objects are holding references to heavy objects.
So ...
8
votes
4answers
367 views
Is there is a case when there is no any reasonable replacement for singleton design pattern? [closed]
Possible Duplicate:
When is Singleton appropriate?
I've seen many explanations why is Singleton is evil. But is there really no such a case when Singleton is the only beautiful solution?
0
votes
1answer
82 views
Is using Singleton correct for Jtree & DefaultTreeModel?
Basically I have one Tree view which uses a single DefaultTreeModel.
Is it okay to use singleton for Tree extending JTree and another singleton for TreeModel extending DefaultTreeModel?
If not, what ...