Contains a registry for GC factories.
A factory function that instantiates an implementation of the GC interface. In case the instance was allocated on the C heap, it is supposed to free itself upon calling it's destructor.
The factory should print an error and abort the program if it cannot successfully initialize the GC instance.
Register a GC factory under the given name
. This function must be called from a C constructor before druntime is initialized.
To use the registered GC, it's name must be specified gcopt runtime option, e.g. by passing , --DRT-gcopt=gc:my_gc_name as application argument.
string name
| name of the GC implementation; should be unique |
GCFactory factory
| function to instantiate the implementation |
Called during runtime initialization to initialize a GC instance of given name
.
string name
| name of the GC to instantiate |
null
if no factory for that name was registered
© 1999–2019 The D Language Foundation
Licensed under the Boost License 1.0.
https://dlang.org/phobos/core_gc_registry.html