Function

CVMetalTextureCacheFlush(_:_:)

Performs internal housekeeping/recycling operations on a texture cache.

Declaration

func CVMetalTextureCacheFlush(_ textureCache: CVMetalTextureCache, _ options: CVOptionFlags)

Parameters

textureCache

The texture cache object to flush.

options

Options for the flush operation. This parameter is currently unused and should be set to 0.

Discussion

The texture cache automatically flushes currently unused resources when you call the CVMetalTextureCacheCreateTextureFromImage(_:_:_:_:_:_:_:_:_:) function, but can you can also flush the cache explicitly by calling this function.