The cache associated with the Running Object Table ensures that the most frequently used objects are retained in memory.

Weak References

When an object is added to the Running Object Table a weak reference to the object is hashed against the object ID.

Ring Cache

Each time an object reference is retrieved from the table, a concrete reference is added to the ring cache - simply an array with a wrap around cursor.

Frequently accessed objects will occur several times in the cache, although a simple check ensures that a new entry is not made if the object is already in the most recent entries - thus preventing tight loops unnecessarily flushing the cache.

Garbage Collection

Providing a concrete reference exists either in the ring cache or in some other user structure the object will not be garbage collected.

Earlier versions of GPO used a finalizer pattern to remove ROT entries. This worked well enough, but a significant performance gain was made when a non-finalizer pattern was used. With this new approach, object entries are removed lazily as hashed ROT entries are checked for an ID hit.