src/GraphCreation.c
/*
 * FUNCTION NAME: removeGraph
 *
 * DESCRIPTION:
 * Function frees every dynamically allocated variable
 * that graph contains.
 */
FUNCTION NAME: removeGraph
DESCRIPTION:
Function frees every dynamically allocated variable
that graph contains.
FUNCTION NAME : removeGraph DESCRIPTION : Function frees every dynamically allocated variable that graph contains .
void removeGraph(Graph_t* graph)
{
    AdjacencyList_t *current, *previous;
    for (current = graph->head; current != NULL;) {
        free(current->from);
        previous = current;
        current = current->next;
        removeAdjacencyListNodes(previous->head);
        free(previous);
    }
    free(graph);
}
void removeGraph ( Graph_t * graph ) { AdjacencyList_t * current , * previous ; for ( current = graph -> head ; current != NULL ; ) { free ( current -> from ) ; previous = current ; current = current -> next ; removeAdjacencyListNodes ( previous -> head ) ; free ( previous ) ; } free ( graph ) ; }
FUNCTION NAME: removeGraph
 DESCRIPTION:
 Function frees every dynamically allocated variable
 that graph contains.
FUNCTION NAME : removeGraph DESCRIPTION : Function frees every dynamically allocated variable that graph contains .