Where is a variable declared in a module allocated?
John Colvin via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Oct 25 15:16:10 PDT 2014
On Saturday, 25 October 2014 at 21:52:13 UTC, MachineCode wrote:
> Where is a variable declared in a module allocated? is it same
> as a C's global?
>
> for example:
>
> module foo;
> int myvar;
that is in thread local storage.
__shared, shared or immutable cause the variable to be in classic
global storage like in C.
See: http://dlang.org/migrate-to-shared.html
More information about the Digitalmars-d-learn
mailing list