Ulf Dittmer wrote:An object being GC'ed is not the same as the object being properly discarded (which would include closing all streams). Since you posted in the Performance forum, are you hoping to save time by not closing streams? If so, don't do it. The overhead will most likely be too small to even measure, and there are various stream implementations that react badly to not being closed properly.
thank you!
my doubt was if the streams are automatically closed when the object is gc.