<div dir="ltr">More complete example:<div><br></div><div><div><font face="courier new, monospace">> (define t (make-table weak-keys: #t weak-values: #t))</font></div><div><font face="courier new, monospace">> (table-set! t (string->symbol "abc") (string->symbol "def"))</font></div>

<div><font face="courier new, monospace">> (table-set! t "ghi" "jkl")</font></div><div><font face="courier new, monospace">> (table-set! t (make-uninterned-symbol "mno") (make-uninterned-symbol "pqr"))</font></div>

<div><font face="courier new, monospace">> (table-set! t 'st 'uv)</font></div><div><font face="courier new, monospace">> (table-set! t (read (open-input-string "w")) (read (open-input-string "x")))</font></div>

<div><font face="courier new, monospace">> (##gc) (##gc) (##gc)</font></div><div><font face="courier new, monospace">> > > (table->list t)</font></div><div><font face="courier new, monospace">((st . uv) (w . x) (abc . def))</font></div>

</div><div><br></div><div><br></div><div>(Note that if you compile this code and load it, the "ghi" and "jkl" strings will not GC too as they're now part of the compiled code, which does not GC. Eval:ed code GC:s.)</div>

<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/25 Mikael <span dir="ltr"><<a href="mailto:mikael.rcv@gmail.com" target="_blank">mikael.rcv@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Ordinary symbols are special in that they are the only values created by Scheme code on runtime that are not garbage collected currently.<div><br></div><div>(The other ones would be any compiled code you load and ___PERM objects you allocate in C.)<br>


<div class="gmail_extra"><br></div><div class="gmail_extra">Compare:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra"><font face="courier new, monospace">> (define t (make-table weak-keys: #t weak-values: #t))</font></div>


<div class="gmail_extra"><font face="courier new, monospace">> (table-set! t (string->symbol "abc") (string->symbol "def"))</font></div><div class="gmail_extra"><font face="courier new, monospace">> (table-set! t "ghi" "jkl")</font></div>


<div class="gmail_extra"><font face="courier new, monospace">> (table-set! t (make-uninterned-symbol "mno") (make-uninterned-symbol "pqr"))</font></div><div class="gmail_extra"><font face="courier new, monospace">> (##gc) (##gc) (##gc)</font></div>


<div class="gmail_extra"><font face="courier new, monospace">> > > (table->list t)</font></div><div class="gmail_extra"><font face="courier new, monospace">((abc . def))</font></div><div><div class="h5"><div>

<br></div><br><div class="gmail_quote">
2013/9/25 Adrien Piérard <span dir="ltr"><<a href="mailto:pierarda@iro.umontreal.ca" target="_blank">pierarda@iro.umontreal.ca</a>></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


Hum, I might have completely misunderstood many things, from what you<br>
wrote to how symbols work, but what if I have a symbol stored as a<br>
weak reference in a table, and it gets garbage collected. If I later<br>
re-read this symbol from the network, then I won't find it in the<br>
table, will I? But wasn't I guaranteed I'd find it  *because* it's a<br>
symbol and thus the table should still be containing an element EQ to<br>
the one I just got from the network?<br>
<span><font color="#888888"><br>
P!<br>
</font></span></blockquote></div><br></div></div></div></div></div>
</blockquote></div><br></div>