File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,12 @@ public struct Unmanaged<Instance: AnyObject> {
34
34
public static func fromOpaque(
35
35
@_nonEphemeral _ value: UnsafeRawPointer
36
36
) -> Unmanaged {
37
- // NOTE: `value` is allowed to be a dangling pointer , so
37
+ // NOTE: `value` is allowed to represent a dangling reference , so
38
38
// this function must not ever try to dereference it. For
39
- // example, it must NOT go through the init(_private:) initializer
40
- // because it requires us to materialize a strong reference to 'Instance'.
41
- // This materialization is enough to convince the compiler to add
42
- // retain/releases which we want to avoid for the opaque pointer functions.
39
+ // example, this function must NOT use the init(_private:) initializer
40
+ // because doing so requires materializing a strong reference to 'Instance'.
41
+ // This materialization would be enough to convince the compiler to add
42
+ // retain/releases which must be avoided for the opaque pointer functions.
43
43
// 'Unmanaged<Instance>' is layout compatible with 'UnsafeRawPointer' and
44
44
// casting to that will not attempt to retain the reference held at 'value'.
45
45
unsafeBitCast ( value, to: Unmanaged< Instance> . self )
You can’t perform that action at this time.
0 commit comments