ScriptFreeCache function (usp10.h)

Frees a script cache.

Syntax

HRESULT ScriptFreeCache(
  [in, out] SCRIPT_CACHE *psc
);

Parameters

[in, out] psc

Pointer to the SCRIPT_CACHE structure.

Return value

Returns 0 if successful. The function returns a nonzero HRESULT value if it does not succeed. The application cant test the return value with the SUCCEEDED and FAILED macros.

Remarks

An application can free the script cache at any time, with certain limitations if the application is multi-threaded. Uniscribe maintains reference counts in its font and shaper caches and frees font data only when all sizes of the font are free. It frees shaper data only when all supported fonts are freed.

The application should free the script cache for a style when it discards that style.

ScriptFreeCache always sets its parameter to NULL to help avoid misreferencing.

Uniscribe functions are re-entrant. Cache creation is interlocked through a single process-wide semaphore. ScriptFreeCache should not be called at a time when another thread might be accessing the particular cache to free. For performance reasons, the cache is not locked during ScriptShape or ScriptPlace.

Important  Starting with Windows 8: To maintain the ability to run on Windows 7, a module that uses Uniscribe must specify Usp10.lib before gdi32.lib in its library list.
 

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header usp10.h
Library Usp10.lib
DLL Usp10.dll
Redistributable Internet Explorer 5 or later on Windows Me/98/95

See also

Caching

SCRIPT_CACHE

Uniscribe

Uniscribe Functions