Do static variables in class consume memory of instances?

Adam D Ruppe destructionator at gmail.com
Thu Jul 22 16:05:41 UTC 2021


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


More information about the Digitalmars-d-learn mailing list