title: Graphviz as a library: Create multiple graphs results in error
body: <p>I'm creating a small C-program that needs to create multiple graphs. The dot for these graphs are in a string, so I'm using <code>agmemread</code> instead of <code>agread</code> (I want to avoid creating temporary files). However, it seems to break when calling <code>agmemread</code> more than once.</p>
  
  <p>The following example outputs "error2", so it fails the second time when calling <code>agmemread</code>:</p>
  
  <pre><code>#include &lt;gvc.h&gt;
  
  int main() {
    Agraph_t *g1 = agmemread("graph testgraph {\n\n}");
  
    if (!g1) {
      printf("error1\n");
      return 1;
    }
  
    agclose(g1);
  
    Agraph_t *g2 = agmemread("graph testgraph {\n\n}");
  
    if (!g2) {
      printf("error2\n");
      return 1;
    }
  
    agclose(g2);
    return 0;
  }
  </code></pre>
  
  <p>In a real life example, there would be some more code between these sections of course.</p>
  
  <p>Do I need to free or close anything before calling agmemread the second time? Or is it a Bug of graphviz? I'm using <code>graphviz: stable 2.30.1, devel 2.31.20130523.0446</code> on Mac OS X.</p>
  
  <p>The same example with <code>agread</code> instead works like a charm.</p>