Arguments: n
Returns a weak vector of n elements. The
vector will be similar to a simple general vector in that the value of
each slot can be any Lisp object and it cannot have a
fill-pointer. The fact that a slot in a weak vector contains an object
does not protect that object from being identified as garbage
and scavenged (or global-gc'ed) away. (In contrast, if an object was
the value of a slot of an ordinary vector which was not itself
garbage, the object could not be garbage.) If the object is disposed
of by the garbage collector, the value of the slot in any weak vectors
pointing to it is changed to nil
.
In addition to weak-vector, make-array takes a :weak keyword argument, which
defaults to nil
. If specified t
, a weak vector of the specified type is
returned. It is an error to specify both :weak and :displaced-to.
As with a normal vector, the values of slots can be accessed with aref and set with setf used in conjunction with aref.
See gc.htm for general information on garbage collection and Weak vectors, finalizations, static arrays, etc. in that document for more on weak vectors.
The documentation is described in introduction.htm and the index is in index.htm.
Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.
Created 2000.10.5.