The singleton pattern

By | Mar 21, 2018

The singleton pattern is a behavioral pattern that restricts the number of instances of a class to one instance.

The decision to use of a singleton should not be done likely as it could hamper the performance of the application and it could most likely not be thread safe. It is also important to note that a single object will also only have a single state which could result in strange behaviors in an multi user web application. Singleton patterns have in the .net world mostly been replaced with the concept of static.


0 0 vote
Article Rating
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments