<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLHazardTrackingMode/tracked",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:@E@MTLHazardTrackingMode@MTLHazardTrackingModeTracked"
  },
  "title" : "MTLHazardTrackingMode.tracked"
}
-->

# MTLHazardTrackingMode.tracked

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

```
case tracked
```

## 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`](/documentation/Metal/MTLHazardTrackingMode) for more information about hazard tracking and how to enable it.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)