What should happen here?
Max Samukha
maxsamukha at gmail.com
Mon Sep 27 14:39:36 UTC 2021
On Monday, 27 September 2021 at 13:59:57 UTC, Steven
Schveighoffer wrote:
>
> What I'm saying is, *if* you need a specific address saved for
> later in a function, wouldn't you prefer to store that on the
> stack rather than store it in the GC's roots? This would
> absolutely be opt-in, not automatic, as I don't see how we can
> do it automatically.
>
If performance was important, you would want to allocate the
object itself on the stack? The cost of GC allocation outweighs
that of GC.addRoot by a lot.
More information about the Digitalmars-d
mailing list