File tree 1 file changed +3
-2
lines changed 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> {
56
56
/// - Returns: An opaque pointer to the value of this unmanaged reference.
57
57
@_transparent
58
58
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
61
62
// try to retain/release. Use 'self' to avoid this. 'Unmanaged<Instance>' is
62
63
// layout compatible with 'UnsafeRawPointer' and casting from that will not
63
64
// attempt to retain the reference held at '_value'.
You can’t perform that action at this time.
0 commit comments