mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Bug 394766: MIInferiorProcess leaks 2x LargePipedInputStreams after a
restart, added guards to avoid NPEs.
This commit is contained in:
parent
e1eee7dfe3
commit
01060d852e
1 changed files with 4 additions and 4 deletions
|
@ -328,12 +328,12 @@ public class MIInferiorProcess extends Process
|
|||
|
||||
private void closeIO() {
|
||||
try {
|
||||
fOutputStream.close();
|
||||
if (fOutputStream != null) fOutputStream.close();
|
||||
// Make sure things get GCed
|
||||
fOutputStream = null;
|
||||
} catch (IOException e) {}
|
||||
try {
|
||||
fInputStream.close();
|
||||
if (fInputStream != null) fInputStream.close();
|
||||
// Make sure things get GCed
|
||||
fInputStream = null;
|
||||
} catch (IOException e) {}
|
||||
|
@ -343,12 +343,12 @@ public class MIInferiorProcess extends Process
|
|||
fInputStreamPiped = null;
|
||||
} catch (IOException e) {}
|
||||
try {
|
||||
fErrorStream.close();
|
||||
if (fErrorStream != null) fErrorStream.close();
|
||||
// Make sure things get GCed
|
||||
fErrorStream = null;
|
||||
} catch (IOException e) {}
|
||||
try {
|
||||
fErrorStreamPiped.close();
|
||||
if (fErrorStreamPiped != null) fErrorStreamPiped.close();
|
||||
// Make sure things get GCed
|
||||
fErrorStreamPiped = null;
|
||||
} catch (IOException e) {}
|
||||
|
|
Loading…
Add table
Reference in a new issue