Sign in Join
FPDoc Onlineexperiment

TResourceCache class

In unit LCLResCache

TResourceCache - a cache (linked list) for storing Resources.

Declaration

pascal
TResourceCache = class

Descends from it: TFontHandleCache THandleResourceCache TPenHandleCache

Description

Nothing more than the line above yet.

Properties

MaxUnusedItempublicMaxUnusedItem - the largest permitted number of unused items.
ResourceCacheItemClasspublicResourceCacheItemClass - the Class of the current Cache Item.
ResourceCacheDescriptorClasspublicResourceCacheDescriptorClass - the class of the current cache item descriptor.

Methods

RemoveItemprotectedRemoveItem from CacheItem list.
RemoveDescriptorprotectedRemoveDescriptor from Cache Descriptor list.
ItemUsedprotectedItemUsed - method for signalling that the specified Item is being used.
ItemUnusedprotectedItemUnused - method for signalling that the specified Item is unused.
ItemIsUsedprotectedItemIsUsed - returns True if specified Item is being used.
CreatepublicConstructor for the class instance.
ClearpublicClears the current entries in the Resource Cache.
DestroypublicDestructor for the class instance.
CompareItemspublicCompareItems - returns 0 if items are equal, -1 if Item1 is less, 1 if Item1 is greater.
CompareDescriptorspublicCompareDescriptors - returns 0 if descriptors are equal, -1 if Desc1 is less, 1 if Desc1 is greater.
ConsistencyCheckpublicConsistencyCheck - checks that Items have valid descriptors.
Lockpublic
Unlockpublic

Fields

FItemsprotected
FDescriptorsprotected
FDestroyingprotectedFDestroying - local boolean variable to store Destroying status.
FResourceCacheDescriptorClassprotectedFResourceCacheDescriptorClass - local variable for holding the class of the current descriptor.
FResourceCacheItemClassprotectedFResourceCacheItemClass - local variable for holding the class of the current cache item.
FMaxUnusedItemprotectedFMaxUnusedItem - how many freed resources to keep.
FFirstUnusedItemprotectedFFirstUnusedItem - local variable storing location of first free item.
FLastUnusedItemprotectedFLastUnusedItem - local variable storing location of last free item.
FUnUsedItemCountprotectedFUnUsedItemCount - local variable with count of free items.
FLockprotected

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.