From: Guillaume Hennequin <guillaume.hennequin@epfl.ch>
To: caml-list@inria.fr
Subject: let x = ... in object ...
Date: Tue, 26 May 2009 14:20:53 +0200 [thread overview]
Message-ID: <d8e32b760905260520g15d12decm5f82c519eb514d17@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 566 bytes --]
Dear list,
I was just wondering whether in
class a =
let x = Array.make 10000 0. in
object
val y = Array.copy x
...
end
x will be garbage collected or not.
(this is just an example, I know creating x and copying is just doesn't make
sense, but I wanted to point out that in my case, x doesn't need to be kept,
but just used during object creation. I would like it to be garbage
collected).
I roughly recall a previous post where I think the reply was "intermediate
values such as x are "kept" as members of the class", but I'm not sure.
Thanks
Guillaume.
[-- Attachment #2: Type: text/html, Size: 658 bytes --]
next reply other threads:[~2009-05-26 12:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-26 12:20 Guillaume Hennequin [this message]
2009-05-26 12:41 ` [Caml-list] " Martin Jambon
2009-05-26 13:06 ` Guillaume Hennequin
2009-05-26 13:30 ` Martin Jambon
2009-05-27 1:46 ` Jacques Garrigue
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=d8e32b760905260520g15d12decm5f82c519eb514d17@mail.gmail.com \
--to=guillaume.hennequin@epfl.ch \
--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