eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'CachingRegistry':

Home

everywhere
www.exept.de
for:
[back]

Class: CachingRegistry


Inheritance:

   Object
   |
   +--Registry
      |
      +--CachingRegistry

Package:
stx:libbasic
Category:
System-Support
Version:
rev: 1.1 date: 1999/07/22 23:17:43
user: cg
file: CachingRegistry.st directory: libbasic
module: stx stc-classLibrary: libbasic
Author:
Claus Gittinger (cg@exept)

Description:


A CachingRegistry behaves generally like a registry;
However, it keeps hard references to the last n registered objects,
preventing them from being garbage collected (and finalized).
This is useful for resources, which do not cost too much memory,
but are expensive to allocate - a special canditate of this kind are
XFonts. With a CachingRegistry, fonts are kept a bit longer alive
and can therefore often be reused - even if temporarily unreferenced.

This is kind of experimental.




[instance variables:]
    keptObjects             Collection      hard referenced objects
    cacheSize               Integer         number of hard references

[class variables:]


Related information:



Instance protocol:

private
o  cacheSize: aNumber

registering objects
o  register: anObject as: aHandle

o  repairTally

o  unregister: anObject atIndex: index



ST/X 6.1.1; WebServer 1.620 at exept:8081; Wed, 23 May 2012 08:02:07 GMT