Confirmed users, Bureaucrats and Sysops emeriti
1,217
edits
(layout/alignment/OOM notes) |
(simpler API) |
||
Line 183: | Line 183: | ||
== Rooting == | == Rooting == | ||
typedef struct GCRoot | The rooting API provides a simple way to treat a particular GC object as a root. More complex rooting scenarios can be accomplished with a precollect hook. | ||
typedef struct GCRoot GCRoot; /* opaque */ | |||
GCRoot* '''gc_root_object'''( | |||
void *gcobject); | |||
Treat gcobject as a root. <var>gcobject</var> must have been allocated with a GC allocation function. | |||
void '''gc_remove_root'''( | void '''gc_remove_root'''( |