mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-03 14:25:37 +02:00
Bug 394766: MIInferiorProcess leaks 2x LargePipedInputStreams after a
restart Change-Id: I882bb800e7df409177a038a5ed5f56a15e887a50 Reviewed-on: https://git.eclipse.org/r/8788 Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com> IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com> Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
parent
50cf74d461
commit
e1eee7dfe3
1 changed files with 15 additions and 5 deletions
|
@ -77,13 +77,13 @@ public class MIInferiorProcess extends Process
|
|||
// Indicates that the inferior has been terminated
|
||||
private boolean fTerminated;
|
||||
|
||||
private final OutputStream fOutputStream;
|
||||
private final InputStream fInputStream;
|
||||
private OutputStream fOutputStream;
|
||||
private InputStream fInputStream;
|
||||
|
||||
private final PipedOutputStream fInputStreamPiped;
|
||||
private PipedOutputStream fInputStreamPiped;
|
||||
|
||||
private final PipedInputStream fErrorStream;
|
||||
private final PipedOutputStream fErrorStreamPiped;
|
||||
private PipedInputStream fErrorStream;
|
||||
private PipedOutputStream fErrorStreamPiped;
|
||||
|
||||
private final DsfSession fSession;
|
||||
|
||||
|
@ -329,18 +329,28 @@ public class MIInferiorProcess extends Process
|
|||
private void closeIO() {
|
||||
try {
|
||||
fOutputStream.close();
|
||||
// Make sure things get GCed
|
||||
fOutputStream = null;
|
||||
} catch (IOException e) {}
|
||||
try {
|
||||
fInputStream.close();
|
||||
// Make sure things get GCed
|
||||
fInputStream = null;
|
||||
} catch (IOException e) {}
|
||||
try {
|
||||
if (fInputStreamPiped != null) fInputStreamPiped.close();
|
||||
// Make sure things get GCed
|
||||
fInputStreamPiped = null;
|
||||
} catch (IOException e) {}
|
||||
try {
|
||||
fErrorStream.close();
|
||||
// Make sure things get GCed
|
||||
fErrorStream = null;
|
||||
} catch (IOException e) {}
|
||||
try {
|
||||
fErrorStreamPiped.close();
|
||||
// Make sure things get GCed
|
||||
fErrorStreamPiped = null;
|
||||
} catch (IOException e) {}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue