<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Hash consing - Page 4 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=hash_consing&amp;p=3">1.Previous</a><br />
<a accesskey="3" href="page.php?w=hash_consing&amp;p=5">3.Next</a>
</p>
<p><code>bwp-object</code> function returns true if the reference given is a broken weak pointer, i.e., the target has been garbage-collected.</p>

<p><syntaxhighlight lang="scheme">;; weak hashes;;(require 'hash-table)</syntaxhighlight></p>

<p>(define (make-weak-table . args)  (apply make-hash-table args))</p>

<p>(define (weak-table-set! table key data)  (let ((w (hash-table-ref table key #f)))    (if w        (vector-set! w 0 data)      (let ((w (make-weak-vector 1)))        (vector-set! w 0 data)        (hash-table-set! table key w)))))</p>

<p>(define</p><p>
<a accesskey="1" href="page.php?w=hash_consing&amp;p=3">1.Previous</a><br />
<a accesskey="3" href="page.php?w=hash_consing&amp;p=5">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
