FunctionPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version

weak-vector

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.


Copyright (c) 1998-2009, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.1. This page was not revised from the 8.0 page.
Created 2009.7.29.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version