Do static variables in class consume memory of instances?

Mark Lagodych lgd.mrk at gmail.com
Thu Jul 22 16:08:31 UTC 2021


On Thursday, 22 July 2021 at 16:05:41 UTC, Adam D Ruppe wrote:
> On Thursday, 22 July 2021 at 15:50:59 UTC, Mark Lagodych wrote:
>> Do static variables consume *any* memory in instances, perhaps 
>> just for pointers to the variables?
>
> nope
>
>> Or does compiler automatically convert 
>> `someObject.someStaticMember` to `SomeClass.someStaticMember`?
>
> right

Thank you! Didn't see your reply.


More information about the Digitalmars-d-learn mailing list