Re: Weak pointers

From: Daniel de Rauglaudre (ddr@peray.inria.fr)
Date: Tue Apr 01 1997 - 14:03:08 MET DST


From: Daniel de Rauglaudre <ddr@peray.inria.fr>
Message-Id: <199704011203.AA07910@peray.inria.fr>
Subject: Re: Weak pointers
In-Reply-To: <199704011057.MAA06827@pauillac.inria.fr> from Pierre Weis at "Apr 1, 97 12:57:27 pm"
To: Pierre.Weis@inria.fr (Pierre Weis)
Date: Tue, 1 Apr 1997 14:03:08 +0200 (MET DST)

> The problem here is that you use constant string data: these citations
> are global references that are never garbage collected, since there
> really exists a pointer to them from the global symbol table.
>
> Use strings allocated by make_string (== String.create) instead: you
> should observe what you expected to observe.

I found another trick to make my example work: replace
   let r = ref "hello"
by:
   let r = ref ("hello" ^ "")

:-)

--------------------------------------------------------------------------
 Daniel de RAUGLAUDRE

 Projet Cristal - INRIA Rocquencourt
 Tel: +33 (01) 39 63 53 51
 Email: daniel.de_rauglaudre@inria.fr
 Web: http://pauillac.inria.fr/~ddr/
--------------------------------------------------------------------------



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:10 MET