ClearScript
ClearScript copied to clipboard
Eliminate lambdas from Invoke calls
This change gets rid of allocations in Invoke and InvokeNoThrow calls. Each allocation is not much, but these functions get called a lot, and it adds up.
Hi @AnsisMalins,
Thanks for posting your PR, but, as before, your change is redundant and/or in conflict with the upcoming ClearScript 7.5, which implements a number of strategies to reduce or eliminate heap allocation. Specifically, the new version replaces nearly all capturing lambdas in the codebase with static lambdas and most heap-allocated scope objects with ref struct scopes.
Thanks again!