This repository has been archived by the owner on May 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
LzmaInputStream#close() doesn't close the wrapped InputStream #14
Comments
related to cstamas/streams#1 |
Scottmitch
added a commit
to Scottmitch/netty
that referenced
this issue
Nov 16, 2016
Motivation: c1932a8 made an assumption that the LzmaInputStream which wraps a ByteBufInputStream would delegate the close operation to the wrapped stream. This assumption is not true and thus we still had a leak. An issue has been logged with our LZMA dependency jponge/lzma-java#14. Modifications: - Force a close on the wrapped stream Result: No more leak.
Scottmitch
added a commit
to netty/netty
that referenced
this issue
Nov 16, 2016
Motivation: c1932a8 made an assumption that the LzmaInputStream which wraps a ByteBufInputStream would delegate the close operation to the wrapped stream. This assumption is not true and thus we still had a leak. An issue has been logged with our LZMA dependency jponge/lzma-java#14. Modifications: - Force a close on the wrapped stream Result: No more leak.
Hi,
I'm not maintaining this project anymore so I'd suggest that you fix it in
your own fork.
Thanks!
|
This was referenced Nov 16, 2016
liuzhengyang
pushed a commit
to liuzhengyang/netty
that referenced
this issue
Sep 10, 2017
Motivation: c1932a8 made an assumption that the LzmaInputStream which wraps a ByteBufInputStream would delegate the close operation to the wrapped stream. This assumption is not true and thus we still had a leak. An issue has been logged with our LZMA dependency jponge/lzma-java#14. Modifications: - Force a close on the wrapped stream Result: No more leak.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
LzmaInputStream
wraps anInputStream
but does not manage the lifetime of thatInputStream
[1]. this is generally common practice (e.g.BufferedInputStream
,GZIPInputStream
, etc...), and may lead to resource leaks if the underlying stream is not managed externally to theLzmaInputStream
. Is there a reason why the lifetime of the wrapped stream is not managed?This may actually be the responsibility of
CoderInputStream
[2], but I figured I would start here.[1] https://github.com/jponge/lzma-java/blob/master/src/main/java/lzma/streams/LzmaInputStream.java
[2] https://github.com/cstamas/streams/blob/master/src/main/java/org/cservenak/streams/CoderInputStream.java#L80
The text was updated successfully, but these errors were encountered: