diff --git a/stdlib/public/core/UnsafePointer.swift b/stdlib/public/core/UnsafePointer.swift index a4e8b9558b9f..f16ca4016cf4 100644 --- a/stdlib/public/core/UnsafePointer.swift +++ b/stdlib/public/core/UnsafePointer.swift @@ -788,6 +788,10 @@ extension UnsafeMutablePointer where Pointee: ~Copyable { /// /// intPointer.deallocate() /// + /// You must only use `deallocate()` to end the lifetime of memory + /// created with `allocate()`; it is a programming error to use `free` or + /// another deallocation API, and may result in undefined behavior. + /// /// - Parameter count: The amount of memory to allocate, counted in instances /// of `Pointee`. @inlinable