Skip to content

Commit b15e4f4

Browse files
committed
SR-6450: Leak in Process on Linux
- The runLoopSource was holding a reference to self creating a retain cycle. Set to nil after the child process has finished.
1 parent a5aa8a0 commit b15e4f4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Foundation/Process.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,7 @@ open class Process: NSObject {
11261126
} while( self.isRunning == true && RunLoop.current.run(mode: .default, before: Date(timeIntervalSinceNow: 0.05)) )
11271127

11281128
self.runLoop = nil
1129+
self.runLoopSource = nil
11291130
}
11301131
}
11311132

0 commit comments

Comments
 (0)