File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -56,8 +56,9 @@ public struct Unmanaged<Instance: AnyObject> {
5656 /// - Returns: An opaque pointer to the value of this unmanaged reference.
5757 @_transparent
5858 public func toOpaque( ) -> UnsafeMutableRawPointer {
59- // NOTE: This function does not attempt to unsafeBitCast '_value' because
60- // that will get a strong reference temporary value who the compiler will
59+ // NOTE: `self` is allowed to be a dangling reference.
60+ // Therefore, this function must not unsafeBitCast '_value' because
61+ // that will get a strong reference temporary value that the compiler will
6162 // try to retain/release. Use 'self' to avoid this. 'Unmanaged<Instance>' is
6263 // layout compatible with 'UnsafeRawPointer' and casting from that will not
6364 // attempt to retain the reference held at '_value'.
You can’t perform that action at this time.
0 commit comments