Provides a simple implementation of the Singleton Pattern. Use this portal to get the shared instance of a certain class which must have a default constructor.
It also keeps track of the lifetime of the instances and will free them in reversed order.
The TSingleton type exposes the following members.
Represents the static constructor of the TSingleton class.
Represents the static destructor of the TSingleton class.
Gets the shared instance of a class.
This class just demonstrates how to apply the classical Singleton Pattern. It's recommended to use the Spring IoC container which is more flexible.
Public static members of this type are thread safe.