---
title: "strictMemorySafety(_:)"
framework: swift-package-manager
role: symbol
role_heading: Type Method
path: "swift-package-manager/documentation/packagedescription/swiftsetting/strictmemorysafety(_:)"
---

# strictMemorySafety(_:)

Enable strict memory safety checking.

## Declaration

```swift
static func strictMemorySafety(_ condition: BuildSettingCondition? = nil) -> SwiftSetting
```

## Parameters

- `condition`: A condition that restricts the application of the build setting.

## Discussion

Discussion Strict memory safety checking is an opt-in compiler feature that identifies any uses of language constructs or APIs that break memory safety. Issues are reported as warnings and can generally be suppressed by adding annotations (such as @unsafe and unsafe) that acknowledge the presence of unsafe code, making it easier to review and audit at a later time. note: First available in PackageDescription 6.2.

## See Also

### Configuring Swift Concurrency

- [defaultIsolation(_:_:)](swift-package-manager/documentation/packagedescription/swiftsetting/defaultisolation(_:_:).md)
