From 720dc220be3decfb3b7d3e9ae6ae0c9815758bda Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Wed, 31 May 2023 07:06:02 -0700 Subject: [PATCH] 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. --- .../Utility/FoundationExtensions/AutoreleasepoolShim.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/SwiftDocC/Utility/FoundationExtensions/AutoreleasepoolShim.swift b/Sources/SwiftDocC/Utility/FoundationExtensions/AutoreleasepoolShim.swift index 9fc8de176..a16394f7f 100644 --- a/Sources/SwiftDocC/Utility/FoundationExtensions/AutoreleasepoolShim.swift +++ b/Sources/SwiftDocC/Utility/FoundationExtensions/AutoreleasepoolShim.swift @@ -8,8 +8,8 @@ See https://swift.org/CONTRIBUTORS.txt for Swift project authors */ -#if os(Linux) || os(Android) -/// A shim for Linux that runs the given block of code. +#if os(Linux) || os(Android) || os(Windows) +/// A shim for non-ObjC targets that runs the given block of code. /// /// The existence of this shim allows you the use of auto-release pools to optimize memory footprint on Darwin platforms while maintaining /// compatibility with Linux where this API is not implemented.