Contents

CVMetalTextureCacheFlush(_:_:)

Manually flushes the contents of the provided 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 0.

Discussion

Texture caches automatically flush unused resources when you call the CVMetalTextureCacheCreateTextureFromImage(_:_:_:_:_:_:_:_:_:) function and on the time interval specified by kCVMetalTextureCacheMaximumTextureAgeKey. Use this method when you need fine-grained control over cache contents and memory.

See Also

Functions