Next: , Previous: , Up: Grammar methods   [Contents][Index]


13.3 Tracking the reference count of the grammar

Function: Marpa_Grammar marpa_g_ref (Marpa_Grammar g)

[Mutator] Increases the reference count of g by 1. Not needed by most applications.

Return value: On success, g. On hard failure, NULL.

Function: void marpa_g_unref (Marpa_Grammar g)

[Destructor] Decreases the reference count by 1, destroying g once the reference count reaches zero.