On Tuesday, 21 June 2016 at 12:53:11 UTC, Adam D. Ruppe wrote:
On Tuesday, 21 June 2016 at 12:48:04 UTC, Gary Willoughby wrote:
I have no idea what that means. Can anyone shed more light on this, please?

So when you use local variables in a delegate, the compiler usually makes a copy of them just in case the delegate gets saved for later.

When you mark it scope, you promise that you won't save it for later, so the compiler skips making the copy.

Right ok, thanks! It doesn't seem to help though as the compiler complains about it being not @nogc.

Reply via email to