English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Preventing values from escaping a context
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-02-10 (18:00)
From: Rich Neswold <rich.neswold@g...>
Subject: Re: [Caml-list] Preventing values from escaping a context
On Wed, Feb 10, 2010 at 2:55 AM, Goswin von Brederlow <goswin-v-b@web.de>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. :)


Google Reader: https://www.google.com/reader/shared/rich.neswold
Jabber ID: rich@neswold.homeunix.net