How long does the context of a delegate exist?
Adam D. Ruppe
destructionator at gmail.com
Sun May 30 11:03:28 UTC 2021
On Sunday, 30 May 2021 at 09:39:28 UTC, cc wrote:
> Is there any way to enforce at compile time that we're not
> accidentally allocating when creating a delegate, other than
> being carefully aware of what variables are referenced inside
> the body?
Use `function` instead of `delegate`. Then it doesn't have a
context pointer at all.
More information about the Digitalmars-d-learn
mailing list