Skip to content

Commit

Permalink
Take doc suggestion from Karoy #1
Browse files Browse the repository at this point in the history
Co-authored-by: Karoy Lorentey <klorentey@apple.com>
  • Loading branch information
Azoy and lorentey committed Jan 16, 2024
1 parent fbe8282 commit f28ebc9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stdlib/public/core/Unmanaged.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ public struct Unmanaged<Instance: AnyObject> {
public static func fromOpaque(
@_nonEphemeral _ value: UnsafeRawPointer
) -> Unmanaged {
// NOTE: This function does NOT go through the init(_private:) initializer
// NOTE: `value` is allowed to be a dangling pointer, so
// this function must not ever try to dereference it. For
// example, it must NOT go through the init(_private:) initializer
// because it requires us to materialize a strong reference to 'Instance'.
// This materialization is enough to convince the compiler to add
// retain/releases which we want to avoid for the opaque pointer functions.
Expand Down

0 comments on commit f28ebc9

Please sign in to comment.