<div dir="ltr">On struct it would make sense, it was indeed only pointered types I had on my mind. Allocate a billion, see for yourself and tell here?</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/8/17 Chris Mueller <span dir="ltr"><<a href="mailto:ruunsmail@gmail.com" target="_blank">ruunsmail@gmail.com</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div class="im">
    <div>Am 16.08.2013 09:54, schrieb Mikael:<br>
    </div>
    </div><blockquote type="cite">
      <div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px"></span>
        <div>
          <span style="font-family:arial,sans-serif;font-size:13px"><br>
          </span></div><div class="im">
        <div><span style="font-family:arial,sans-serif;font-size:13px">Remember
            that for c-define-type :s that do not have a release
            procedure specified, there is *no* deallocation (such as
            free() etc.) invoked at their scheme-world GC.</span></div>
        <div><span style="font-family:arial,sans-serif;font-size:13px"><br>
          </span></div>
      </div></div>
    </blockquote>
    <br>
    I've read in the documentation for the default release function
    (pointer ..) and (nonnull-pointer ...) types are not performing any
    deallocation like you mentioned.<br>
    <br>
    I'm a little bit curious about (struct ..) type-definitions because
    due to the documentation it has probably a more useful default
    behaviour for releasing.<br>
    <br>
    Can i assume if i allocate and use a (struct ...) type that the GC
    management system will handle this reference properly? (in contrast
    to pointers)<br>
    <br>
    This would save me a lot of specific cleanup code for all predefined
    types if gambit's system is performing delete calls automatically
    for structs.<br>
    <br>
    e.g.<br>
    <br>
    (c-define-type std::string (struct "std::string"))<br>
    (define string-new (c-lambda (nonnull-char-string) std::string
    "___result_voidstar = new std::string(___arg1);"))<br>
    <br>
    <br>
    Only for clarification for myself i don't create memory leaks.<br>
    <br>
    Thanks,<br>
    Chris<br>
    <br>
    <br>
  </div>

<br>_______________________________________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br>
<br></blockquote></div><br></div>