Technical Articles

What is singleton class?

0 0
-In object-oriented programming , a singleton class is a class that can have only one object (an instance of the class) at a time. For example, using Visual C++ , the “Application” class is an example of a singleton class. You can only create only one object of an Application class.


A class which is having only single object is called singleton.


Logger classes. For logging purposes of an application there is usually one logger instance required.
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
× How can I help you?