Block statements and memory management
Murilo
murilomiranda92 at hotmail.com
Sat Apr 6 03:57:26 UTC 2019
On Saturday, 16 March 2019 at 15:53:26 UTC, Johan Engelen wrote:
> On Saturday, 16 March 2019 at 03:47:43 UTC, Murilo wrote:
>> Does anyone know if when I create a variable inside a scope as
>> in
>> {int a = 10;}
>> it disappears complete from the memory when the scope
>> finishes? Or does it remain in some part of the memory? I am
>> thinking of using scopes to make optimized programs that
>> consume less memory.
>
> Others have made good points in this thread, but what is
> missing is that indeed scopes _can_ be used beneficially to
> reduce memory footprint.
> -Johan
I would like to thank everyone for your help, those informations
were very helpful.
More information about the Digitalmars-d-learn
mailing list