lzma-java icon indicating copy to clipboard operation
lzma-java copied to clipboard

LzmaOutputStream leaks threads

Open cowtowncoder opened this issue 14 years ago • 2 comments

When trying to performance test compression part, Hprof dump lists huge number of threads; it looks as if threads were leaked somehow. Since I am closing LzmaOutputStream there seems to be little I can do to prevent this, so it looks like a bug. (as far as I understand, threads are needed to work around impedance of underlying implementation which does not make it easy to model Java Input/OutputStreams; ideally this shouldn't be needed obviously).

cowtowncoder avatar Jul 24 '11 18:07 cowtowncoder

Does your code properly close streams? Threads (should) terminate on close().

jponge avatar Jan 07 '12 22:01 jponge

Test code definitely should have done that, but it has been a while. If that didnt occur, I would consider it a client problem not bug. So as far as I know this is not due to forgetting to close streams.

cowtowncoder avatar Jan 07 '12 23:01 cowtowncoder