@Override
    public void cleanup() {
        if (state != null && state.textFormat != null) {
            state.textFormat.flush();
        }
        if (cmds != null) {
            cmds.finish();
        }

        stack = null;
        parserStates = null;
        state = null;
        path = null;
        cmds = null;
    }