diff --git a/src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs b/src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs index 29cdf6d6d0a..7cb7327a273 100644 --- a/src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs +++ b/src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs @@ -83,3 +83,4 @@ type FSharpScript(?captureInput: bool, ?captureOutput: bool, ?additionalArgs: st stdin.Dispose() stdout.Dispose() stderr.Dispose() + (fsi :> IDisposable).Dispose()