Advanced Swift
Q95 / 100

What is Swift's Unmanaged<T> type?

Correct! Well done.

Incorrect.

The correct answer is B) A wrapper for manually managing ARC reference counts, used in Core Foundation interop where retain/release must be explicit

B

Correct Answer

A wrapper for manually managing ARC reference counts, used in Core Foundation interop where retain/release must be explicit

Explanation

Unmanaged<CFString>.passRetained(str).toOpaque() passes a retained CF object. takeRetainedValue() / takeUnretainedValue() control whether ARC gets ownership.

Progress
95/100