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 QAA05452; Mon, 8 Jul 2002 16:21:02 +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 QAA05739 for ; Mon, 8 Jul 2002 16:21:01 +0200 (MET DST) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g68EL1P16192 for ; Mon, 8 Jul 2002 16:21:01 +0200 (MET DST) Received: from akasha.ijm.jussieu.fr (akasha.ijm.jussieu.fr [134.157.173.57]) by shiva.jussieu.fr (8.12.4/jtpda-5.4) with ESMTP id g68EKtlD092571 ; Mon, 8 Jul 2002 16:20:55 +0200 (CEST) Received: by akasha.ijm.jussieu.fr (Postfix, from userid 11004) id 58DFA3BEAB; Mon, 8 Jul 2002 16:21:23 +0200 (CEST) From: Olivier Andrieu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15657.40931.172864.564738@akasha.ijm.jussieu.fr> Date: Mon, 8 Jul 2002 16:21:23 +0200 To: Fernando Alegre Cc: caml-list@inria.fr Subject: Re: [Caml-list] finalizing bigarrays In-Reply-To: <20020708132830.GA14019@oso.local> References: <20020708132830.GA14019@oso.local> X-Mailer: VM 7.07 under Emacs 20.7.1 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Fernando Alegre [Monday 8 July 2002] : > > Are there any plans to add a "finalize" function to externally > managed bigarrays? > > We have a C library that allocates bigarrays in a certain complex > way and needs to deallocate them when the bigarrays are no longer > in use. We have thought of several ways to do this, but neither is > optimal, except the last one: > > 1) Wrap the bigarray in a custom type that we need to drag along > with it all the time. The finalizer in the custom type will then > deallocate the bigarray. How about defining external finalise_my_bigarray : ('a, 'b, 'c) Bigarray.Genarray.t -> unit and then using Gc.finalise ? -- Olivier ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners