DESCRIPTION

ctf: Fix simple resource leak warnings

Many warnings left though. For instance, the Stream/StreamInput/
StreamInputReader etc. constructor should create their inner Closeable
objects themselves (instead of having to pass say
new StreamInput(new StreamInputReader(...)) ). That way they can keep
a reference to it, and close() it in their own close() method.

Right now nobody keeps a reference to them, and they never get closed.

Change-Id: I708cfb7d2da12ea4d5c7c8f8a8bbcdf77263ddc1
Signed-off-by: Braxton Mccarthy xxx@xxx.xxx


COMMENTS

author: Braxton Mccarthy
date: 2014-06-17 18:30:34.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2014-06-17 19:38:10.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/7396/

-------------------------------------
author: Brenden Conley
date: 2014-06-17 19:51:42.000000000

Patch Set 2: Verified-1

Build Failed 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/7396/ : FAILURE

-------------------------------------
author: Annalise Jimenez
date: 2014-06-17 20:04:14.000000000

Patch Set 2: Code-Review-1

(1 comment)

Sounds legit enough, just one small question, but I'll let Matthew do the full review

Line:518, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java -> You keep a reference to fis in the fFileInputStreams list. What happens to it once out of the try? Obviously not much since all unit tests still work... What is it used for anyway, I just see this .add and the close() in the close().

-------------------------------------
author: Braxton Mccarthy
date: 2014-06-18 15:39:50.000000000

Patch Set 2:

(1 comment)

Line:518, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java -> hmm, good point... 

but waitaminnit, those fFileInputStreams are never used anywhere, other than in the close() ?!? Why are those references kept then??

-------------------------------------
