---
title: clearCaches()
framework: coreimage
role: symbol
role_heading: Instance Method
path: coreimage/cicontext/clearcaches()
---

# clearCaches()

Frees any cached data, such as temporary images, associated with the context and runs the garbage collector.

## Declaration

```swift
func clearCaches()
```

## Discussion

Discussion You can use this method to remove textures from the texture cache that reference deleted images.

## See Also

### Managing Resources

- [reclaimResources()](coreimage/cicontext/reclaimresources().md)
- [offlineGPUCount()](coreimage/cicontext/offlinegpucount().md)
- [workingColorSpace](coreimage/cicontext/workingcolorspace.md)
- [workingFormat](coreimage/cicontext/workingformat.md)
