From: Oliver Bandel <oliver@first.in-berlin.de>
To: caml-list@inria.fr
Subject: Freeing allocated C-memory by GC (destructors)
Date: Wed, 23 Jan 2008 17:46:14 +0100 [thread overview]
Message-ID: <1201106774.47976f56aa4e0@webmail.in-berlin.de> (raw)
Hello,
after using some non-permanent allocating C-stuff
together with OCaml, I think about going one step further and
now have allocated memory from C represented as OCaml-variables
(in the concrete example I have married some of my C-stuff that
uses jpeglib to get information from picture-files, and
now think about representing complete picture-data as
OCaml-variables).
So, I want to have the possibility to have malloced/calloced
data avaliable in OCaml, and that the GC calls C-destructor-
functions (using free(3)) when the values are of no use anymore.
How to say the GC, which is the destructor-functions
for a variable, which has been created?
TIA,
Oliver
next reply other threads:[~2008-01-23 16:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-23 16:46 Oliver Bandel [this message]
2008-01-23 17:18 ` [Caml-list] " RABIH.ELCHAAR
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=1201106774.47976f56aa4e0@webmail.in-berlin.de \
--to=oliver@first.in-berlin.de \
--cc=caml-list@inria.fr \
/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