/* @a_this: the current instance of #CRStatement. Destructor of #CRStatement.  */
void cr_statement_destroy(CRStatement *a_this)
/* @a_this: the current instance of #CRStatement. Destructor of #CRStatement.  */
void cr_statement_destroy(CRStatement *a_this)
{
        CRStatement *cur = NULL;
        g_return_if_fail (a_this);
        for (cur = a_this; cur && cur->next; cur = cur->next) {
                cr_statement_clear (cur);
        }
        if (cur)
                cr_statement_clear (cur);
        if (cur->prev == NULL) {
                g_free (a_this);
                return;
        }
        for (cur = cur->prev; cur && cur->prev; cur = cur->prev) {
                if (cur->next) {
                        g_free (cur->next);
                        cur->next = NULL;
                }
        }
        if (!cur)
                return;
        if (cur->next) {
                g_free (cur->next);
                cur->next = NULL;
        }
        g_free (cur);
        cur = NULL;
}