~ubuntu-branches/debian/sid/ocaml/sid

« back to all changes in this revision

Viewing changes to stdlib/weak.mli

  • Committer: Bazaar Package Importer
  • Author(s): Stefano Zacchiroli
  • Date: 2009-02-22 08:49:13 UTC
  • mfrom: (12.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090222084913-3i0uw2bhd0lgw0ok
* Uploading to unstable
* debian/control: bump dh-ocaml to (>= 0.4) to avoid buggy ocamlinit.mk

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
(*                                                                     *)
12
12
(***********************************************************************)
13
13
 
14
 
(* $Id: weak.mli,v 1.15 2004/02/02 14:43:12 doligez Exp $ *)
 
14
(* $Id: weak.mli,v 1.16.2.1 2008/11/13 10:39:46 doligez Exp $ *)
15
15
 
16
16
(** Arrays of weak pointers and hash tables of weak pointers. *)
17
17
 
20
20
 
21
21
type 'a t
22
22
(** The type of arrays of weak pointers (weak arrays).  A weak
23
 
   pointer is a value that the garbage collector may erase at
24
 
   any time.
 
23
   pointer is a value that the garbage collector may erase whenever
 
24
   the value is not used any more (through normal pointers) by the
 
25
   program.  Note that finalisation functions are run after the
 
26
   weak pointers are erased.
 
27
 
25
28
   A weak pointer is said to be full if it points to a value,
26
29
   empty if the value was erased by the GC.
27
 
   Note that weak arrays cannot be marshaled using
28
 
   {!Pervasives.output_value} or the functions of the {!Marshal}
29
 
   module.
 
30
 
 
31
   Notes:
 
32
   - Integers are not allocated and cannot be stored in weak arrays.
 
33
   - Weak arrays cannot be marshaled using {!Pervasives.output_value}
 
34
     nor the functions of the {!Marshal} module.
30
35
*)
31
36
 
32
37