caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* let x = ... in object ...
@ 2009-05-26 12:20 Guillaume Hennequin
  2009-05-26 12:41 ` [Caml-list] " Martin Jambon
  0 siblings, 1 reply; 5+ messages in thread
From: Guillaume Hennequin @ 2009-05-26 12:20 UTC (permalink / raw)
  To: caml-list

[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-05-27  1:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-26 12:20 let x = ... in object Guillaume Hennequin
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).