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=2.6 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 93EEFBBAF for ; Mon, 22 Jun 2009 19:03:20 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmwCAJtWP0rRVd65jmdsb2JhbACYJD8BAQEBCQkKCapUjW0BAwIEhAYFhy0 X-IronPort-AV: E=Sophos;i="4.42,269,1243807200"; d="scan'208";a="28539503" Received: from mail-pz0-f185.google.com ([209.85.222.185]) by mail2-smtp-roc.national.inria.fr with ESMTP; 22 Jun 2009 19:03:19 +0200 Received: by pzk15 with SMTP id 15so1572903pzk.1 for ; Mon, 22 Jun 2009 10:03:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to :content-type:content-transfer-encoding; bh=grt87mGJE1ZpITnidPxYGPD5IX5tAgrhioGKd+t5NaE=; b=wVyR/npmsAwGuu9PIgu+7LWLMvyriZnYiPi3eW3CK5c60Uuu+I0a16wJLXAaZDn69F GGFuixevk1uDDXg2W1+c7oq40klB7APxk9LnzakelZlwXEUImaUYZ0G/M+csObN6yq+P MRcRV/PNdvWx7TOF8OdINFJ3E45eD/nsKrFFM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; b=SBRfPBOU1XJRP7JOxi5xhA8NEr13OehP9nd/p4l8XljP+UthIHXixhfzhfFNKqsbhI 1R3b0EZ84juDk6ZsCQ4+R/11iQ5j/G0VOiB6CeLXKrh8U0R8joONv/DBB55B7k7HE8Rk txxiic8TAQPy3aDlqKo40OJodhwUsQu/8mH20= MIME-Version: 1.0 Sender: jake.donham@gmail.com Received: by 10.142.82.6 with SMTP id f6mr2794919wfb.182.1245690198938; Mon, 22 Jun 2009 10:03:18 -0700 (PDT) In-Reply-To: References: <4A3BCE1A.3010403@citycable.ch> <91F6B99D-3075-47A1-9257-0BD208C6D5D8@erratique.ch> From: Jake Donham Date: Mon, 22 Jun 2009 10:02:58 -0700 X-Google-Sender-Auth: 561b2159b51a75a5 Message-ID: Subject: Re: [Caml-list] Re: Obj.magic and existential types. To: OCaml List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; existential:01 bunzli:01 buenzli:01 corresponds:01 dependencies:01 dependencies:01 2009:98 garbage:01 imho:01 wrote:01 dynamically:01 caml-list:01 chunk:02 chunk:02 top-level:03 On Sun, Jun 21, 2009 at 5:03 PM, Daniel B=FCnzli wrote: > Does that mean the only values froc knows how to garbage collect are thos= e > values that are dynamically created in an update cycle and not used furth= er > ? (because that's rather contrived IMHO) Everything in froc happens on a "timeline". When you bind a changeable value, there's a chunk of the timeline that corresponds to the dynamic scope of the bind function. When the value changes, that chunk is removed, which unregisters any dependencies created in the course of evaluating the bind function. So it is true that dependencies created outside a bind are not removed; but you can always fix this by wrapping everything in a top-level bind (as in the code I posted). Best regards, Jake