From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: *** X-Spam-Status: No, score=3.8 required=5.0 tests=DNS_FROM_RFC_POST,HTML_10_20, HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 47EC6BC37 for ; Tue, 26 May 2009 14:20:54 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AogCAIt7G0rRVdyukGdsb2JhbACCIDKUXD8BAQEBCQkMBxEDpUSPMAEDAQSEBwWHBA X-IronPort-AV: E=Sophos;i="4.41,251,1241388000"; d="scan'208";a="28326187" Received: from mail-fx0-f174.google.com ([209.85.220.174]) by mail3-smtp-sop.national.inria.fr with ESMTP; 26 May 2009 14:20:54 +0200 Received: by fxm22 with SMTP id 22so3779602fxm.9 for ; Tue, 26 May 2009 05:20:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=L3u55mykU5J0feiJ2keLkTdPDkCGYRzK3RTTPfReTWo=; b=C/fIuIwgatY9pMbHIKrOGVx1bQpww98BKNS6bIVHOLnoSNW1X2pUfaxEi67bS+gHim 7eXiXhyjzo9wgWBklXfRdvh/yCHrTEkd7WK6KpdUTJF/Bhq4fa+YvuNAwKXZKkb+uEFD Sv97LxAlAsvjXnxxUca/JmccW78tT3t0mxLHk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=U3IOCS4lDEMd0QgT9U1YyrZtpAzqu7tOyu9U0ZdyZBiSbDO5LWxg2qFNT4S037RioV PKrt0RBOJiGc2iADmUvlQJPGzZJzuzYEOs/DOIRCsLTHoROt6YeAViPtAmBo1eWOhNW8 Fs+cM9mHEp2uVTa+0Eo44Of/urie+fCia+q4g= MIME-Version: 1.0 Sender: gje.hennequin@gmail.com Received: by 10.223.107.19 with SMTP id z19mr4442676fao.27.1243340453880; Tue, 26 May 2009 05:20:53 -0700 (PDT) Date: Tue, 26 May 2009 14:20:53 +0200 X-Google-Sender-Auth: 6b11a6fcbb071b2f Message-ID: Subject: let x = ... in object ... From: Guillaume Hennequin To: caml-list@inria.fr Content-Type: multipart/alternative; boundary=001636c5abcc16a3a2046acfc20b X-Spam: no; 0.00; guillaume:01 guillaume:01 val:01 val:01 garbage:01 garbage:01 epfl:02 let:03 let:03 intermediate:05 i'm:09 i'm:09 object:09 object:09 wondering:09 --001636c5abcc16a3a2046acfc20b Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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. --001636c5abcc16a3a2046acfc20b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Dear list,

I was just wondering whether in

class a =3D
= =A0 let x =3D Array.make 10000 0. in
object
=A0 val y =3D Array.copy = x
=A0 ...
end

x will be garbage collected or not.
(this is = just an example, I know creating x and copying is just doesn't make sen= se, but I wanted to point out that in my case, x doesn't need to be kep= t, but just used during object creation. I would like it to be garbage coll= ected).
I roughly recall a previous post where I think the reply was "intermed= iate values such as x are "kept" as members of the class", b= ut I'm not sure.

Thanks

Guillaume.
--001636c5abcc16a3a2046acfc20b--