---
title: MTLHazardTrackingMode.tracked
framework: metal
role: symbol
role_heading: Case
path: metal/mtlhazardtrackingmode/tracked
---

# MTLHazardTrackingMode.tracked

An option that directs Metal to apply runtime safeguards that prevent memory hazards when commands access a resource.

## Declaration

```swift
case tracked
```

## Discussion

Discussion Metal tracks memory dependencies for resources you create with this option. When at least one command writes to a tracked resource, the framework takes the following actions: Delay write operations until all previous read operations finish Prevent subsequent commands from running until write operations finish This automatic hazard tracking provides safety for your resources without requiring you to manually synchronize access with barriers, fences, or events. See MTLHazardTrackingMode for more information about hazard tracking and how to enable it.

## See Also

### Selecting the tracking mode

- [MTLHazardTrackingMode.default](metal/mtlhazardtrackingmode/default.md)
- [MTLHazardTrackingMode.untracked](metal/mtlhazardtrackingmode/untracked.md)
