TSingleton Record
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.
Show:
Name | Description | |
---|---|---|
Create@ | Represents the static constructor of the TSingleton class. | |
Destroy@ | Represents the static destructor of the TSingleton 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.