mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +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() {
|
private void closeIO() {
|
||||||
try {
|
try {
|
||||||
fOutputStream.close();
|
if (fOutputStream != null) fOutputStream.close();
|
||||||
// Make sure things get GCed
|
// Make sure things get GCed
|
||||||
fOutputStream = null;
|
fOutputStream = null;
|
||||||
} catch (IOException e) {}
|
} catch (IOException e) {}
|
||||||
try {
|
try {
|
||||||
fInputStream.close();
|
if (fInputStream != null) fInputStream.close();
|
||||||
// Make sure things get GCed
|
// Make sure things get GCed
|
||||||
fInputStream = null;
|
fInputStream = null;
|
||||||
} catch (IOException e) {}
|
} catch (IOException e) {}
|
||||||
|
@ -343,12 +343,12 @@ public class MIInferiorProcess extends Process
|
||||||
fInputStreamPiped = null;
|
fInputStreamPiped = null;
|
||||||
} catch (IOException e) {}
|
} catch (IOException e) {}
|
||||||
try {
|
try {
|
||||||
fErrorStream.close();
|
if (fErrorStream != null) fErrorStream.close();
|
||||||
// Make sure things get GCed
|
// Make sure things get GCed
|
||||||
fErrorStream = null;
|
fErrorStream = null;
|
||||||
} catch (IOException e) {}
|
} catch (IOException e) {}
|
||||||
try {
|
try {
|
||||||
fErrorStreamPiped.close();
|
if (fErrorStreamPiped != null) fErrorStreamPiped.close();
|
||||||
// Make sure things get GCed
|
// Make sure things get GCed
|
||||||
fErrorStreamPiped = null;
|
fErrorStreamPiped = null;
|
||||||
} catch (IOException e) {}
|
} catch (IOException e) {}
|
||||||
|
|
Loading…
Add table
Reference in a new issue