From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA19357 for caml-redistribution; Tue, 18 Mar 1997 19:19:51 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA17169 for ; Tue, 18 Mar 1997 16:52:05 +0100 (MET) Received: from hplb.hpl.hp.com (hplb.hpl.hp.com [15.255.59.2]) by concorde.inria.fr (8.7.6/8.7.3) with ESMTP id QAA21454 for ; Tue, 18 Mar 1997 16:51:57 +0100 (MET) Received: from betze.bbn.hp.com by hplb.hpl.hp.com; Tue, 18 Mar 1997 15:51:49 GMT Received: from localhost (localhost [127.0.0.1]) by betze.bbn.hp.com with SMTP (8.7.1/8.7.1) id QAA27551; Tue, 18 Mar 1997 16:51:48 +0100 (MET) Message-Id: <199703181551.QAA27551@betze.bbn.hp.com> X-Authentication-Warning: betze.bbn.hp.com: Host localhost [127.0.0.1] didn't use HELO protocol X-Mailer: exmh version 1.6.4 10/10/95 To: Damien Doligez Cc: caml-list@pauillac.inria.fr Subject: Re: Weak pointers In-Reply-To: Damien.Doligez's message of Tue, 18 Mar 1997 15:34:54 +0100. <199703181434.PAA12806@tobago.inria.fr> X-Face: 7'_lwZ-\~X.Q]-O#D;ju@c|HTi9[>\U8jV5(8sQpm)twOCgN.y]9s:L}A1_]h}_LHF@U5!2 5~FJ"9)`@~BEg9d;ftlb:bj9N>RTv0[VvZe7EMMB:$9hUc]&d9VN? Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 18 Mar 1997 15:51:46 +0000 From: Kohler Markus Sender: weis > >The problem is that if you delete an element in the tree it may be that the > >hash table still points to the node, because there was no garbage collection > >yet. It could be possible that you would still find the entry trough the hash > >table. > > I don't see a problem here. You find the entry and use it instead of > allocating a new node. This is a rather good thing. It means you > avoid allocating, and leave less garbage for the GC to collect. > But how do you know then that value is not valid anymore ? I you use a flag to indicate that then I don't see an advantage of using a weak pointer. The same could be done with a "normal" pointer. Markus -- +----------------------------------------------------------------------------+ | Markus Kohler Hewlett-Packard GmbH | | Software Engineer Network & System Management Division| | IT/E Success Team | +----------------------------------------------------------------------------+