Testing some singleton implementations

Dejan Lekic dejan.lekic at gmail.com
Fri Jan 31 03:44:01 PST 2014


On Friday, 31 January 2014 at 11:42:29 UTC, Andrej Mitrovic wrote:
> On 1/31/14, Dejan Lekic <dejan.lekic at gmail.com> wrote:
>> SingletonSimple is a winner
>
> Well yeah, but that's not really the only thing what a 
> singleton is
> about. It's also about being able to initialize the singleton 
> at an
> arbitrary time, rather than in a module constructor before 
> main() is
> called.

Absolutely, that is why I would use bothe alternatives, depending 
on the use-case.


More information about the Digitalmars-d mailing list