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


12.3 Keeping the reference count of a recognizer

Function: Marpa_Recognizer marpa_r_ref (Marpa_Recognizer r)

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

Return value: On success, the recognizer object, r. On failure, NULL.

Function: void marpa_r_unref (Marpa_Recognizer r)

Decreases the reference count by 1, destroying r once the reference count reaches zero. When r is destroyed, the reference count of its base grammar is decreased by one. If this takes the reference count of the base grammar to zero, it too is destroyed.