static this() not executed
Ron Tarrant
rontarrant at gmail.com
Thu May 9 09:16:57 UTC 2019
On Wednesday, 8 May 2019 at 18:06:35 UTC, Robert M. Münch wrote:
> Forget that... I used my (quite complex code, not exactly
> reflected in the example) not correctly... works now.
For future reference, it sounds like what you're after is a
singleton. There's an example here:
https://wiki.dlang.org/Low-Lock_Singleton_Pattern
Instantiation is done with get() instead of this().
More information about the Digitalmars-d-learn
mailing list