[Graph Libraries] memory leak between gvLayout and gvFreeLayout
Ported Issue from Mantis Original ID: 2555 Reported By: burning
SEVERITY: CRASH Submitted: 2015-06-18 13:02:20
OS: WINDOWS 7 64BIT
Hi!I'm using Graphviz as a library in my win32 program.My issue is when drawing few graphs(less than 1000), it works well.But when the number of graph grows to tens of thousands, the physical memory is used up.My program's execution flow is: ①gvContext() ②Loop：agopen(graphid, Agdirected, 0) -> insert nodes and edges -> gvLayout(gvc, graph, "dot") -> gvRenderFilename(gvc, graph, "svg", filename) -> gvFreeLayout(gvc, graph) -> agclose(graph)) ③gvFreeContext(gvc)
Did I make some mistakes?I find that when calling gvLayout, memory usage grows about 10 MB.But it doesn't reduce after calling gvFreeLayout.So,after having drew thousands of graphs, memory usage grows to 2GB, then the program crashes.