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
Finalization and object dependencies
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-11-17 (01:44)
From: Stefan Monnier <monnier@i...>
Subject: Re: Finalization and object dependencies
> Usually, application code will gracefully close all cursors, and the
> table, but I want my library to be as safe as possible to use, and
> avoid random crashes or memory leaks.

I recommend to consider it an error if the table (and cursors) were not
properly closed.  So instead of hiding the error (by silently closing tables
from finalizers), I recommend you signal an exception or at least log some
warning to stderr or syslog or something.