Ejemplo n.º 1
0
/*
---------------------------------------
    释放接口
---------------------------------------
*/
static void_t
iPAK_RAR_release (
  __CR_IN__ iPACKAGE*   that
    )
{
    leng_t          idx;
    iPAK_RAR*       real;
    sPAK_RAR_FILE*  list;

    pack_free_list(that);
    real = (iPAK_RAR*)that;
    list = (sPAK_RAR_FILE*)real->pack.__filelst__;
    if (list != NULL) {
        for (idx = 0; idx < real->m_cnt; idx++) {
            mem_free(list[idx].base.find);
            mem_free(list[idx].base.name);
        }
        mem_free(list);
    }
    if (real->m_rar != NULL)
        RARCloseArchive(real->m_rar);
    TRY_FREE(real->m_ansi);
    TRY_FREE(real->m_wide);
    TRY_FREE(real->m_pass);
    mem_free(that);
}
Ejemplo n.º 2
0
/*
---------------------------------------
    释放接口
---------------------------------------
*/
static void_t
iPAK_IPAC_release (
  __CR_IN__ iPACKAGE*   that
    )
{
    uint_t      idx;
    iPAK_IPAC*  real;
    sPAK_FILE*  list;

    pack_free_list(that);
    real = (iPAK_IPAC*)that;
    list = real->pack.__filelst__;
    if (list != NULL) {
        for (idx = 0; idx < real->m_cnt; idx++) {
            mem_free(list[idx].find);
            mem_free(list[idx].name);
        }
        mem_free(list);
    }
    CR_VCALL(real->m_file)->release(real->m_file);
    mem_free(that);
}
Ejemplo n.º 3
0
/*
---------------------------------------
    释放接口
---------------------------------------
*/
static void_t
iPAK_XP3_release (
    __CR_IN__ iPACKAGE*   that
)
{
    leng_t          idx;
    iPAK_XP3*       real;
    sPAK_XP3_FILE*  list;

    pack_free_list(that);
    real = (iPAK_XP3*)that;
    list = (sPAK_XP3_FILE*)real->pack.__filelst__;
    if (list != NULL) {
        for (idx = 0; idx < real->m_cnt; idx++) {
            mem_free(list[idx].segm_lst);
            mem_free(list[idx].base.find);
            mem_free(list[idx].base.name);
        }
        mem_free(list);
    }
    CR_VCALL(real->m_file)->release(real->m_file);
    mem_free(that);
}