Skip to content

Commit f22ea1a

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. (cherry picked from commit b15e4f4)
1 parent 81023c5 commit f22ea1a

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
@@ -1128,6 +1128,7 @@ open class Process: NSObject {
11281128
} while( self.isRunning == true && RunLoop.current.run(mode: .default, before: Date(timeIntervalSinceNow: 0.05)) )
11291129

11301130
self.runLoop = nil
1131+
self.runLoopSource = nil
11311132
}
11321133
}
11331134

0 commit comments

Comments
 (0)