Previous Section Next Section Table of Contents Glossary Index

Chapter 16. Understanding and Configuring the Garbage Collector

16.6. Weak References Dictionary

[Function]

make-population &key type initial-contents

Arguments and Values:

type---The type of population, one of :LIST (the default) or :ALIST

initial-contents--- A sequence of elements (or conses, for :alist) to be used to initialize the population. The sequence itself (and the conses in case of an alist) is not stored in the population, a new list or alist is created to hold the elements.

Description:

Creates a new population of the specified type.

[Function]

population-type population

Description:

returns the type of population, one of :LIST or :ALIST

[Function]

population-contents population

Description:

returns the list encapsulated in population. Note that as long as there is a direct (non-weak) reference to this list, it will not be modified by the garbage collector. Therefore it is safe to traverse the list, and even modify it, no different from any other list. If you want the elements to become garbage-collectable again, you must stop refering to the list directly.

[Function]

(setf (population-contents population) contents)

Description:

Sets the list encapsulated in population to contents. Contents is not copied, it is used directly.


Previous Section Next Section Table of Contents Glossary Index