<div dir="ltr"><div>You probably want `register-finalizer&#39;:<br><a href="http://docs.racket-lang.org/foreign/foreign_pointer-funcs.html#%28def._%28%28lib._ffi/unsafe..rkt%29._register-finalizer%29%29">http://docs.racket-lang.org/foreign/foreign_pointer-funcs.html#%28def._%28%28lib._ffi/unsafe..rkt%29._register-finalizer%29%29</a><br>

<br></div><div>See also:<br><a href="http://docs.racket-lang.org/foreign/Allocation_and_Finalization.html">http://docs.racket-lang.org/foreign/Allocation_and_Finalization.html</a><br><br></div><div>Regarding the default behavior, I think Racket does not free automatically what it did not allocate itself.<br>

</div>So the lib you&#39;re linking to either has functions to do the allocation/deallocation, or its doc should say what you need to free yourself.<br><div></div><div><div><br></div></div>Laurent<br></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Sat, Jun 15, 2013 at 12:47 PM, Клочков Роман <span dir="ltr">&lt;<a href="mailto:kalimehtar@mail.ru" target="_blank">kalimehtar@mail.ru</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>When I describe type<br><br>(_fun _string -&gt; _string)<br><br>where can I put, whether these string c-pointers should be freed after function call? Also, what is default behavior?<span class="HOEnZb"><font color="#888888"><br>

<br><br>-- <br>Роман Клочков</font></span></div>
<br>____________________<br>
  Racket Users list:<br>
  <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br></blockquote></div><br></div>