No, collection could not occure if we speaking about current D GC implementation. So it safe to set pointer before addRoot.
On Saturday, 19 September 2015 at 18:20:16 UTC, Ola Fosheim Grøstad wrote:
I'm not sure if the current collector scans all registers, or just scans the stack?
According to the docs it scans all registers, but even then one must be careful and do addRoot before the pointer is set, otherwise the CPU might flush the register and a collection could run between setting the pointer and addRoot...?