I look at the codebase and I often see something like:
public class SomeClass
{
protected static SomeClass myObject;
public static SomeClass getObject()
{
return myOjbect
}
}
I would like to make sure that I understand the purpose of this. Does this mean that one instance of the class is shared, even if it is created multiple times? I am not sure about this dictionary, otherwise I would be looking for an answer, so if this template has a name, please let me know.
Also, this seems like a small definition of chicken and egg, because a class includes an object of type class. Why is this not paradoxical?
Thank!
source
share