Skip to content

Commit

Permalink
FoundationExtensions: enable autoreleasepool on Windows (#602)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
compnerd committed May 31, 2023
1 parent b279723 commit 720dc22
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -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.
Expand Down

0 comments on commit 720dc22

Please sign in to comment.