From: Shivkumar Chandrasekaran <shiv@ece.ucsb.edu>
To: caml-list@inria.fr
Subject: [Caml-list] Weak pointers and Gc.finalise
Date: Wed, 31 Mar 2004 20:48:45 -0800 [thread overview]
Message-ID: <DB9719D9-8397-11D8-AAA7-003065BDAA76@ece.ucsb.edu> (raw)
I just noticed that if the only reference to a bigarray is in a Weak.t
array, and if there is a finalisation function set on the bigarray,
then that finalisation function is not necessarily called when the
entry in the Weak.t array is set to None. Rather it is potentially
called *much* later.
I am assuming that this is the right behaviour.
My question is, can I get the finalisation function to be called when
the weak pointer is being set to None?
(Side note: I am trying to avoid Marshaling the Bigarray unless it is
going to be garbage-collected. But if I cannot detect that, then I have
to always Marshal it whenever its entries change, which is very
inefficient.)
Thanks,
--shiv--
-------------------
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 reply other threads:[~2004-04-01 4:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-01 4:48 Shivkumar Chandrasekaran [this message]
2004-04-01 17:07 ` Damien Doligez
2004-04-01 19:21 ` Shivkumar Chandrasekaran
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=DB9719D9-8397-11D8-AAA7-003065BDAA76@ece.ucsb.edu \
--to=shiv@ece.ucsb.edu \
--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