Page 343 Table of Contents Index Page 345
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E



APPENDIX B. THE CLIM-SYS PACKAGE

deinitializer is a form that is used to deinitialize an object when it is about to be returned to
the resource. It can access the parameters as variables, and also has access to a variable called
name, which is the object to be deinitialized. It is called whenever an object is deallocated back
to the resource, but is not called by clear-resource. Deinitializers are typically used to clear
references to other objects.

matcher is a form that ensures that an object in the resource "matches" the specified parameters,
which it can access as variables. In addition, the matcher also has access to a variable called
name, which is the object in the resource being matched against. If no matcher is supplied, the
system remembers the values of the parameters (including optional ones that defaulted) that
were used to construct the object, and assumes that it matches those particular values for all
time. This comparison is done with equal. The matcher should return true if there is a match,
otherwise it should return false.

initial-copies is used to specify the number of objects that should be initially put into the resource.
It must be an integer or nil (the default), meaning that no initial copies should be made. If
initial copies are made and there are parameters, all the parameters must be optional; in this
case, the initial copies have the default values of the parameters.

=> using-resource (variable name &rest parameters) &body body [Macro]
The forms in body are evaluated with variable bound to an object allocated from the resource
named name, using the parameters given by parameters. The parameters (if any) are evaluated,
but name is not.

After the body has been evaluated, using-resource returns the object in variable back to the
resource. If some form in the body sets variable to nil, the object will not be returned to the
resource. Otherwise, the body should not changes the value of variable.

=> allocate-resource name &rest parameters [Function]
Allocates an object from the resource named name, using the parameters given by parameters.
name must be a symbol that names a resource. The returned value is the allocated object.

=> deallocate-resource name object [Function]
Returns the object object to the resource named name. name must be a symbol that names a
resource. object must be an object that was originally allocated from the same resource.

=> clear-resource name [Function]
Clears the resource named name, that is, removes all of the resourced object from the resource.
name must be a symbol that names a resource.

=> map-resource function name [Function]
Calls function once on each object in the resource named name. function is a function of three
arguments, the object, a boolean value that is true if the object is in use or false if it is free, and
name. function has dynamic extent.


Page 343 Table of Contents Index Page 345
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E