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


18.3 Tracking the reference count of the grammar

Mutator function: Marpa_Grammar marpa_g_ref (Marpa_Grammar g)

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

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

Destructor function: void marpa_g_unref (Marpa_Grammar g)

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