Is there a way to check if a pointer is supposed to point to non-GC allocated memory? I presume not. This is needed to prevent unnecessary calls to `GC.addRange` in containers with elements of a type that in turn is a container-like struct with non-GC allocated memory.

If not, maybe we could tag those non-GC-mangaged pointers with a UDA, preferrably `@nogc`, and then build a trait, say, `hasGCIndirections` that doesn't include @nogc-pointers.


What do you think?

Reply via email to