Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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. :)

-- 
Rich

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