From: Olivier Andrieu <andrieu@ijm.jussieu.fr>
To: Fernando Alegre <fernando@cc.gatech.edu>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] finalizing bigarrays
Date: Mon, 8 Jul 2002 16:21:23 +0200 [thread overview]
Message-ID: <15657.40931.172864.564738@akasha.ijm.jussieu.fr> (raw)
In-Reply-To: <20020708132830.GA14019@oso.local>
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
next prev parent reply other threads:[~2002-07-08 14:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-08 13:28 Fernando Alegre
2002-07-08 14:21 ` Olivier Andrieu [this message]
2002-07-08 14:48 Damien Doligez
2002-07-08 14:52 ` Fernando Alegre
2002-07-08 15:48 ` Xavier Leroy
2002-07-09 4:49 ` Fernando Alegre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15657.40931.172864.564738@akasha.ijm.jussieu.fr \
--to=andrieu@ijm.jussieu.fr \
--cc=caml-list@inria.fr \
--cc=fernando@cc.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox