From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id CAA24443; Thu, 16 Aug 2001 02:58:06 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id CAA24483 for ; Thu, 16 Aug 2001 02:58:05 +0200 (MET DST) Received: from ns2.s2001.siggraph.org (ns2.s2001.siggraph.org [204.192.63.254]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f7G0vxv15800; Thu, 16 Aug 2001 02:58:00 +0200 (MET DST) Received: from checkerlap.d6.com (ir-012.s2001.siggraph.org [204.192.63.12]) by ns2.s2001.siggraph.org (8.11.2/8.11.2) with ESMTP id f7G0vZd27913; Wed, 15 Aug 2001 17:57:41 -0700 (PDT) Message-Id: <4.3.2.7.2.20010815175549.02c293d0@shell16.ba.best.com> X-Sender: def6@shell16.ba.best.com X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Wed, 15 Aug 2001 17:59:31 -0700 To: "Alexander V. Voinov" , Xavier Leroy From: Chris Hecker Subject: Re: [Caml-list] register_global_root, malloc, etc. Cc: caml-list@inria.fr In-Reply-To: <3B79DDC7.36D40AC3@quasar.ipa.nw.ru> References: <4.3.2.7.2.20010726013540.027fa990@shell16.ba.best.com> <20010814102537.A4081@pauillac.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >I can't understand who will delete `foo *', allocated via `foo *p = new >foo'? free_foo unregisters the roots pointing inside foo, and then deletes foo. The GC will deallocate the abstract object itself. > As I understood from the manual, Custom_tag is the only way to >assign free_foo with the resulting Caml object. Custom means the object gets a finalization call from the gc. Abstract means there's no finalization. I should be using Custom so my foo doesn't leak. Chris ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr