<div dir="ltr"><div>Hi all and happy &quot;new academic year&quot;,</div><div><br></div><div>I stumbled upon a case where I need to create multiple short lived s7 instances</div><div>(per thread). And I&#39;m seeing the memory consumption getting higher and higher</div><div>in my application.<br></div><div><br></div><div>What happens when we call &quot;free(s7)&quot; (s7 = s7_init) ?</div><div>From what I&#39;m seeing.. nothing</div><div><br></div><div>Consider this snippet, when in every loop I&#39;m creating a c-object pointing</div><div>to a ~100mb char array.</div><div><br></div><div>    for (int i = 0; i &lt; 10; i++) {<br>        s7_scheme *sc = s7_init();<br>        aod::s7::bind_all(sc); // binds the aod.c.foreign</div><div>        s7_eval_c_string(sc,<br>                         &quot;(define x ((aod.c.foreign &#39;new-char[]) 100000000))&quot; // ~100 mb<br>                        );<br><br>        free(sc);<br>    }</div><div><br></div><div>That memory doesn&#39;t get freed. After all the iteration the memory usage will be ~1GB.</div><div>I think at some point I stumbled upon a comment in the s7 source code that was saying</div><div>something about this (could me mistaken though)</div><div><br></div><div>Thanks,</div><div>Christos<br></div></div>