Skip to content

GraphDeinit

Description

Release every node, every edge list, and the backing slot storage of g. If the graph was created with a deep-copy deinit callback, that callback is invoked on each live node payload before the slot is freed.

Parameters

Name Direction Description
g in,out Graph to deinitialize. Must not be used until reinitialized.

Success

All node payloads released, all edge bookkeeping freed; g left in the zeroed post-deinit state.

Failure

Cannot fail; aborts on a corrupted magic via the validator.

Usage example (Cross-references)

Usage examples (Cross-references)
        result = result && GraphPredecessorAt(&graph, c, 0) == a;
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return result;
        result      = result && (ZstrCompare(*GraphNodePtrAt(&graph, red), "red") == 0);
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return result;
        (void)GraphNodeData(&graph_b, node);
    
        GraphDeinit(&graph_b);
        GraphDeinit(&graph_a);
        DefaultAllocatorDeinit(&alloc);
    
        GraphDeinit(&graph_b);
        GraphDeinit(&graph_a);
        DefaultAllocatorDeinit(&alloc);
        return false;
        (void)GraphPredecessorAt(&graph, a, 0);
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return false;
        (void)GraphNeighborAt(&graph, b, 0);
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return false;
                      GraphMutationEpoch(&graph) == 0 && GraphAllocator(&graph)->alignment == 1;
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return result;
        result = result && GraphContainsNode(&graph, node_id);
    
        GraphDeinit(&graph);
        HeapAllocatorDeinit(&alloc);
        return result;
        result = result && !GraphNodeVisited(node) && (GraphNodeVisitCount(node) == 0);
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return result;
        result = result && !GraphNodeVisited(GraphGetNode(&graph, d));
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return result;
        result      = result && (GraphNodeCount(&graph) == 1);
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return result;
        result = result && (GraphPredecessorAt(&graph, c, 0) == a);
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return result;
        result      = result && (GraphEdgeCount(&graph) == 1);
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return result;
        result      = result && (GraphInDegree(&graph, c) == 0);
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return result;
        result      = result && (GraphInDegree(&graph, a) == 0);
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return result;
        result      = result && (GraphInDegree(&graph, d) == 0);
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return result;
        result                           = result && (GraphNodeAt(&graph, reused) == 99);
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return result;
        (void)GraphNodeVisit(node);
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return false;
        result = result && (VecPtrAt(&graph.slots, GraphNodeIdIndex(third_id))->generation == (third_generation + 1));
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return result;
    
        StrDeinit(&name);
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return result;
                      ZstrCompare(StrBegin(stored_name), "alpha") == 0;
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return result;
        result = result && (graph_h.pending_edge_removals.allocator->retry_limit == 31);
    
        GraphDeinit(&graph_a);
        GraphDeinit(&graph_b);
        GraphDeinit(&graph_c);
    
        GraphDeinit(&graph_a);
        GraphDeinit(&graph_b);
        GraphDeinit(&graph_c);
        GraphDeinit(&graph_d);
        GraphDeinit(&graph_a);
        GraphDeinit(&graph_b);
        GraphDeinit(&graph_c);
        GraphDeinit(&graph_d);
        GraphDeinit(&graph_e);
        GraphDeinit(&graph_b);
        GraphDeinit(&graph_c);
        GraphDeinit(&graph_d);
        GraphDeinit(&graph_e);
        GraphDeinit(&graph_f);
        GraphDeinit(&graph_c);
        GraphDeinit(&graph_d);
        GraphDeinit(&graph_e);
        GraphDeinit(&graph_f);
        GraphDeinit(&graph_g);
        GraphDeinit(&graph_d);
        GraphDeinit(&graph_e);
        GraphDeinit(&graph_f);
        GraphDeinit(&graph_g);
        GraphDeinit(&graph_h);
        GraphDeinit(&graph_e);
        GraphDeinit(&graph_f);
        GraphDeinit(&graph_g);
        GraphDeinit(&graph_h);
        GraphDeinit(&graph_f);
        GraphDeinit(&graph_g);
        GraphDeinit(&graph_h);
    
        HeapAllocatorDeinit(&aligned_64);
        result      = result && GraphNodeAt(&graph, id1) == 7;
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return result;
        result      = result && GraphPredecessorAt(&graph, c, 0) == a;
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return result;
        result      = result && (GraphPredecessorAt(&graph, a, 2) == c);
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return result;
    
        MapDeinit(&index);
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return result;
    
        MapDeinit(&counts);
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return result;
        result      = result && (GraphInDegree(&graph, a) == 0);
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return result;
        }
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return false;
        }
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return false;
        }
    
        GraphDeinit(&graph);
        DefaultAllocatorDeinit(&alloc);
        return false;
Last updated on