예제 #1
0
파일: sh_text.c 프로젝트: kanzure/brlcad
HIDDEN void
txt_free(void *cp)
{
    struct txt_specific *tp =	(struct txt_specific *)cp;

    bu_vls_free(&tp->tx_name);
    if (tp->tx_binunifp) rt_binunif_free(tp->tx_binunifp);
    if (tp->tx_mp) bu_close_mapped_file(tp->tx_mp);
    tp->tx_binunifp = (struct rt_binunif_internal *)NULL; /* sanity */
    tp->tx_mp = (struct bu_mapped_file *)NULL; /* sanity */
    BU_PUT(cp, struct txt_specific);
}
예제 #2
0
파일: sh_text.c 프로젝트: cciechad/brlcad
/*
 *			T X T _ F R E E
 */
HIDDEN void
txt_free(char *cp)
{
    struct txt_specific *tp =	(struct txt_specific *)cp;

    bu_vls_free(&tp->tx_name);
    if (tp->tx_binunifp) rt_binunif_free( tp->tx_binunifp );
    if (tp->tx_mp) bu_close_mapped_file( tp->tx_mp );
    tp->tx_binunifp = GENPTR_NULL; /* sanity */
    tp->tx_mp = GENPTR_NULL; /* sanity */
    bu_free( cp, "txt_specific" );
}