Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001799graphvizOutput Generationpublic2010-01-21 09:382011-04-28 04:03
ReporterRoman Tatkin 
Assigned Toellson 
PlatformOS*-*-OS Version
Summary0001799: memory leak using cairo

Could you please give me a hint on what I'm doing wrong with Graphviz so it leaks a lot of memory ?

I'm running MFC-based application, when the user clicks a button on the dialog a beatiful graph should appear.

So, this is how it looks:

void CSomeDialog::OnShowTree()
    CGV_s* pContext = gvContext();
    Agraph_t* pGraph = agopen("name", AGRAPHSTRICT);
    // Add nodes and edges to pGraph
    gvLayout(pContext, pGraph, "dot");
    gvRenderFilename(pContext, pGraph, "png", lpszGraphFile);
    ::ShellExecuteEx(..); // Run default viewer on just created *.png
    gvFreeLayout(pContext, pGraph);

Each time I press this button my application consumes about 20-30 Mbytes (the graph is quite big) and never returns it to the heap. Looks like I'm using Graphviz abnormally, your advice will be kindly appreciated.
Additional Information

For the record, the fix is in:
    lib/gvc/gvrender.c r1.162
    plugin/pango/gvrender_pango.c r1.70

TagsNo tags attached.
STATUS-COMMENTFixed (21 Jan 2010)
VERSION     2.27
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-04-28 04:03 user1 New Issue
2011-04-28 04:03 user1 Assigned To => user695

MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker