Report a bug
		
				If you spot a problem with this page, click here to create a Bugzilla issue.
		
			Improve this page
		
			Quickly fork, edit online, and submit a pull request for this page.
			Requires a signed-in GitHub account. This works well for small changes.
			If you'd like to make larger changes you may want to consider using
			a local clone.
		
	core.gc.registry
Contains a registry for GC factories.
License: 
Authors: 
Martin Nowak
- aliasGCFactory= GC function();
- 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.
- nothrow @nogc voidregisterGCFactory(stringname, GCFactoryfactory);
- Register a GC factory under the givenname. 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.Parameters:string namename of the GC implementation; should be unique GCFactory factoryfunction to instantiate the implementation Note The registry does not perform synchronization, as registration is assumed to be executed serially, as is the case for C constructors. See Also:
- GCcreateGCInstance(stringname);
- Called during runtime initialization to initialize a GC instance of givenname.Parameters:string namename of the GC to instantiate Returns:The created GC instance or null if no factory for that name was registered
Copyright © 1999-2025 by the D Language Foundation | Page generated by
Ddoc on Mon Mar 31 10:27:33 2025