From 2bb9c19ab893cd58bfc16f7ad87492dce48e2667 Mon Sep 17 00:00:00 2001 From: "zra@google.com" Date: Tue, 28 Oct 2014 23:02:54 +0000 Subject: [PATCH] Fixes memory leak in Process.runSync() This was introduced in 36665 by https://codereview.chromium.org/307503002/ R=iposva@google.com Review URL: https://codereview.chromium.org//690513002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41378 260f80e4-7a28-3924-810f-c04153c831b5 --- runtime/bin/process_patch.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/runtime/bin/process_patch.dart b/runtime/bin/process_patch.dart index 9e374ae8b72..2de6ba608cd 100644 --- a/runtime/bin/process_patch.dart +++ b/runtime/bin/process_patch.dart @@ -451,6 +451,9 @@ class _ProcessImpl extends _ProcessImplNativeWrapper with _ServiceObject return encoding.decode(output); } + _stdin._sink.destroy(); + _processes.remove(_serviceId); + return new _ProcessResult( result[0], result[1],