From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 05513BC37 for ; Wed, 10 Feb 2010 19:00:32 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuwBAO+CckvRVdnhi2dsb2JhbACDCo1/ghOHPwgVAQEBCgsKBxEFIK1ALoFKhHGIcgEBAwWDdVsE X-IronPort-AV: E=Sophos;i="4.49,445,1262559600"; d="scan'208";a="52406843" Received: from mail-gx0-f225.google.com ([209.85.217.225]) by mail1-smtp-roc.national.inria.fr with ESMTP; 10 Feb 2010 19:00:31 +0100 Received: by gxk25 with SMTP id 25so275738gxk.17 for ; Wed, 10 Feb 2010 10:00:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=g6PyM03cIbMmdpXDnI8adL2n0GZOOr4hvBW0oSZZOE4=; b=tbI86oE5TEYIwpdvsugRyQyBjfzaaTCsH+S6i0XCGtdBl+Hoj5/pUFnKbSERY1UYXc CSE1g/TrS5HTJl9yfC4CfF45yRPjJ/WPuByQLuTv3DDqTqVrY5IfpckR505sIoQL92/2 WiDLX5p5Wn0dDHboE6SgpuZgKYqfN/z5s884A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=ZPbG0alJr+XrMvOTpJHICsULa3IzF73U6Z8JloYvtsw1aPRmni2DnISTyRur0XRre/ TdX8MDOui772YyRD6RZC3+Ssx3ql85RANt9T+RiqxWoHOeeOXwRT3na2PyrEvoTl5VEc t1C8KUmF55cRBvEzTNEWGVvUL6F1c6USTudog= MIME-Version: 1.0 Received: by 10.101.117.14 with SMTP id u14mr739842anm.108.1265824830797; Wed, 10 Feb 2010 10:00:30 -0800 (PST) In-Reply-To: <871vgto4gd.fsf@frosties.localdomain> References: <14cf844b1002081907y2900c313q97ae0cb6f4c92394@mail.gmail.com> <20100209.123813.39168535.garrigue@math.nagoya-u.ac.jp> <4B711D44.7040509@irisa.fr> <14cf844b1002091009p1a3181j793c2d6b2cdcbae5@mail.gmail.com> <4B71AD39.8020503@irisa.fr> <14cf844b1002091639q5641977evc2101f72c80bd10d@mail.gmail.com> <871vgto4gd.fsf@frosties.localdomain> Date: Wed, 10 Feb 2010 12:00:30 -0600 Message-ID: <14cf844b1002101000p2737c63yd311be691c9661b1@mail.gmail.com> Subject: Re: [Caml-list] Preventing values from escaping a context From: Rich Neswold To: Goswin von Brederlow Cc: caml-list@inria.fr Content-Type: multipart/alternative; boundary=001636eee654633955047f42cfea X-Spam: no; 0.00; finalizer:01 finalizer:01 escapes:01 escapes:01 10,:98 belt:98 10,:98 belt:98 wrote:01 wrote:01 caml-list:01 api:02 api:02 tend:03 tend:03 X-Attachments: cset="UTF-8" cset="UTF-8" --001636eee654633955047f42cfea Content-Type: text/plain; charset=UTF-8 On Wed, Feb 10, 2010 at 2:55 AM, Goswin von Brederlow wrote: > Why not make the context a custom block with finalizer? The finalizer > then frees the resources. If the context escapes then it remains alive > and the finalizer will not be called any time soon. Only when it is no > longer reachable. That would also allow someone to create a context and use > it for a number of operations before forgeting it. > Good point. I'll need to consider this as a possible API direction. I have many years of C/C++ programming under my belt, so I tend to want to micromanage the resources. :) -- Rich Google Reader: https://www.google.com/reader/shared/rich.neswold Jabber ID: rich@neswold.homeunix.net --001636eee654633955047f42cfea Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Feb 10, 2010 at 2:55 AM, Goswin von Brederlow <= ;goswin-v-b@web.de> wrot= e:
Why not make the context a custom block with finalizer? The finalizer
then frees the resources. If the context escapes then it remains alive
and the finalizer will not be called any time soon. Only when it is no
longer reachable. That would also allow someone to create a context and=C2= =A0use it for a number of operations before forgeting it.
<= /div>
Good point. I'll need to consider this as a poss= ible API direction. I have many years of C/C++ programming under my belt, s= o I tend to want to micromanage the resources. :)
--001636eee654633955047f42cfea--