From 165be8bf12cddbf073f03413dbad0b3967e8e018 Mon Sep 17 00:00:00 2001 From: erg Date: Thu, 11 Jun 2009 15:54:54 +0000 Subject: [PATCH] Re-inforce need to zero out g->u --- doc/addingLayout.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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. -- 2.40.0