From: erg Date: Thu, 11 Jun 2009 15:54:54 +0000 (+0000) Subject: Re-inforce need to zero out g->u X-Git-Tag: LAST_LIBGRAPH~32^2~1928 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=165be8bf12cddbf073f03413dbad0b3967e8e018;p=graphviz Re-inforce need to zero out g->u --- diff --git a/doc/addingLayout.txt b/doc/addingLayout.txt index cd0455891..103078589 100644 --- a/doc/addingLayout.txt +++ b/doc/addingLayout.txt @@ -155,10 +155,13 @@ semantics of these are described below. each node and edge. This cleans up splines labels, ND_pos, shapes and 0's out the A*info_t, so these have to occur last, but could be part of explicit xxx_cleanup_node and xxx_cleanup_edge, if desired. - At the end, we usually include + At the end, you should do if (g != g->root) memset(&(g->u), 0, sizeof(Agraphinfo_t)); + This is necessary for the graph to be laid out again, as the layout + code assumes this structure is clean. + libgvc does a final cleanup to the root graph, freeing any drawing, freeing its label, and zeroing out Agraphinfo_t of the root graph.