Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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 <>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:
Jabber ID: