Singleton Pattern with struct

Jacob Carlborg doob at me.com
Thu Jan 24 07:05:14 PST 2013


On 2013-01-24 15:43, Maxim Fomin wrote:

> Even if Singleton.instance returns by ref, s object is still
> stack-allocated struct, which is not affected by further modification of
> private pointer.

The struct is allocated using "new".

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list