From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p7GB4mNC014352 for ; Tue, 16 Aug 2011 13:04:48 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AksHAE5NSk7V+6tl/2dsb2JhbABBmSSPC3eBQAEBBQwmAVYLRhQoiCa6S4VoXwSkCQ X-IronPort-AV: E=Sophos;i="4.67,379,1309730400"; d="scan'208";a="105577974" Received: from eneide.happyleptic.org ([213.251.171.101]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 16 Aug 2011 13:04:42 +0200 Received: from extranet.securactive.org ([82.234.213.170] helo=ccellier.rd.securactive.lan) by eneide.happyleptic.org with esmtp (Exim 4.72) (envelope-from ) id 1QtHRq-0005Q0-4G for caml-list@inria.fr; Tue, 16 Aug 2011 13:04:42 +0200 Received: from rixed by ccellier.rd.securactive.lan with local (Exim 4.72) (envelope-from ) id 1QtHRk-0001sy-W6 for caml-list@inria.fr; Tue, 16 Aug 2011 13:04:36 +0200 Date: Tue, 16 Aug 2011 13:04:36 +0200 From: rixed@happyleptic.org To: caml-list@inria.fr Message-ID: <20110816110436.GB6227@ccellier.rd.securactive.lan> References: <4E4A2488.4050706@gmail.com> <4E4A2DAC.5010207@gmail.com> <20110816094636.GA6227@ccellier.rd.securactive.lan> <4E4A43B8.8030306@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4E4A43B8.8030306@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: [Caml-list] Interfacing with C: bad practice -[ Tue, Aug 16, 2011 at 01:17:28PM +0300, Török Edwin ]---- > So a best practice would be to always use a temporary variable > registered with CAMLlocal* when you call a function that can potentially invoke the GC? I would say the best practive would be to not call an allocating function from a parameters list, since other values in the parameters list are unregistered copies untill the call is taken. I would really like to see this exemple in the manual as well.