Skip to content

Commit 720dc22

Browse files
authored
FoundationExtensions: enable autoreleasepool on Windows (#602)
The `autoreleasepool` is technically required on all non-ObjC runtimes. It is likely better to use the unstable `_runtime(_ObjC)` check but for now simply extend the OS list with Windows.
1 parent b279723 commit 720dc22

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/SwiftDocC/Utility/FoundationExtensions/AutoreleasepoolShim.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
*/
1010

11-
#if os(Linux) || os(Android)
12-
/// A shim for Linux that runs the given block of code.
11+
#if os(Linux) || os(Android) || os(Windows)
12+
/// A shim for non-ObjC targets that runs the given block of code.
1313
///
1414
/// The existence of this shim allows you the use of auto-release pools to optimize memory footprint on Darwin platforms while maintaining
1515
/// compatibility with Linux where this API is not implemented.

0 commit comments

Comments
 (0)