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


11.3 Tracking the reference count of the grammar

Function: Marpa_Grammar marpa_g_ref (Marpa_Grammar g)

Increases the reference count by 1. Not needed by most applications.

Return value: On success, the grammar object it was called with; NULL on failure.

Function: void marpa_g_unref (Marpa_Grammar g)

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