/* Decrements the ref count of the current instance of #CRTerm. If the ref count reaches zero, the instance is destroyed.  */
gboolean cr_term_unref(CRTerm *a_this)
/* Decrements the ref count of the current instance of #CRTerm. If the ref count reaches zero, the instance is destroyed.  */
gboolean cr_term_unref(CRTerm *a_this)
{
        g_return_val_if_fail (a_this, FALSE);
        if (a_this->ref_count) {
                a_this->ref_count--;
        }
        if (a_this->ref_count == 0) {
                cr_term_destroy (a_this);
                return TRUE;
        }
        return FALSE;
}