Programmer Question
Hi all!
There is a piece of project dealing mostly with input/output streams. So I have to pass streams as arguments and receive them from third-party libraries. I've read Good design: How to pass InputStreams as argument? and Closing Java InputStreams, but I'm not 100% sure that third-parties are sharing the same coding values and following best designs patterns (in particular - "the one who opens the stream should close the stream")
Assuming that streams are pretty big (500Mb - 3Gb) and I'm tight on CPU and memory resources, here are few questions to the java SO community:
- Should I ever try to close streams I got from third-party library?
- What are possible dangerous implications of unclosed streams (not counting extra GC workload)
- Are these implications somewhat proportional to the stream size?
Find the answer here
No comments:
Post a Comment