链表的清空操作


typedef struct _NodeList
{
    void *nodeItem;
    struct _NodeList *next;
}NodeList;

void Node_free( NodeList *nList )
{
    Nodelist *next;
    while( nList != NULL ){
        next = nList->next;
        free(nLlist);
        nList = next;
    }

}

 

你可能感兴趣的:(链表)