What should happen here?

Adam D Ruppe destructionator at gmail.com
Sun Sep 26 00:32:50 UTC 2021


On Sunday, 26 September 2021 at 00:23:19 UTC, Ali Çehreli wrote:
>   c.method
>
> which to me is clearly "using" it again.

If it is a final method that doesn't actually use any class 
variables then it doesn't actually use the `this` pointer. The 
optimizer sees this and can let the object go.

That code can also run without crashing if c is null too btw for 
the same reason.


More information about the Digitalmars-d mailing list