> (define t (make-table weak-keys: #t weak-values: #t))
> (table-set! t (string->symbol "abc") (string->symbol "def"))
> (table-set! t "ghi" "jkl")
> (table-set! t (make-uninterned-symbol "mno") (make-uninterned-symbol "pqr"))
> (table-set! t 'st 'uv)
> (table-set! t (read (open-input-string "w")) (read (open-input-string "x")))
> (##gc) (##gc) (##gc)
> > > (table->list t)
((st . uv) (w . x) (abc . def))
(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.)