From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.2 required=5.0 tests=AWL,DNS_FROM_SECURITYSAGE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 24F27BB84 for ; Fri, 31 Oct 2008 18:00:21 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhYEADPWCknAXQIngWdsb2JhbACUDgEBFiK5fYNR X-IronPort-AV: E=Sophos;i="4.33,523,1220220000"; d="scan'208";a="19432736" Received: from concorde.inria.fr ([192.93.2.39]) by mail1-smtp-roc.national.inria.fr with ESMTP; 31 Oct 2008 18:00:20 +0100 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m9VH0KJ7006587 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 31 Oct 2008 18:00:20 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnIAAKvWCklCbwQbi2dsb2JhbACUDgEBAQoLCgcPBrl9g1E X-IronPort-AV: E=Sophos;i="4.33,523,1220220000"; d="scan'208";a="30984417" Received: from out3.smtp.messagingengine.com ([66.111.4.27]) by mail4-smtp-sop.national.inria.fr with ESMTP; 31 Oct 2008 18:00:20 +0100 Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id 2B0AE189F70; Fri, 31 Oct 2008 13:00:19 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Fri, 31 Oct 2008 13:00:19 -0400 X-Sasl-enc: hnzLhw2lhkIArN5L3rJccnKCvIyQIy7T7p7kiJ+yihQT 1225472418 Received: from [192.168.1.10] (ALyon-157-1-126-20.w90-42.abo.wanadoo.fr [90.42.21.20]) by mail.messagingengine.com (Postfix) with ESMTPSA id 0A3971F3EA; Fri, 31 Oct 2008 13:00:17 -0400 (EDT) Message-ID: <490B37D9.1030402@ens-lyon.org> Date: Fri, 31 Oct 2008 17:52:41 +0100 From: Martin Jambon User-Agent: Thunderbird 2.0.0.17 (X11/20081008) MIME-Version: 1.0 To: =?ISO-8859-1?Q?Daniel_B=FCnzli?= Cc: OCaml Mailing List Subject: Re: [Caml-list] understanding weak References: <490A6A19.9050704@ens-lyon.org> <9E14E68C-5480-46B8-9426-11EE40B6B139@erratique.ch> <490B1CDC.8080808@ens-lyon.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Miltered: at concorde with ID 490B39A4.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ens-lyon:01 bunzli:01 gc'ed:01 pointer:01 pointer:01 wrote:01 caml-list:01 jambon:01 jambon:01 arbitrary:02 define:02 confusing:02 daniel:04 fst:06 ecrit:06 Daniel Bünzli wrote: > > Le 31 oct. 08 à 15:57, Martin Jambon a écrit : > >> (fst x) would certainly cause funny effects if x were GC'ed at an >> arbitrary time after it has been added to the weak array. > > You are confusing reclaiming the weak pointer (the Some x) and > reclaiming what the weak pointer refers to (the x). It's the former the > OP was talking about. I don't see what makes you define (Some x) as a weak pointer. Martin -- http://mjambon.com/