[...]
  Somewhere between the two.  We should close the stream when we know we
are done with it to help the system reclaim resources sooner but I don't
think this is a full out bug.  I'll fix it anyway as it's easy to fix
and I agree it's ugly.
[...]


Thanks for you help. Of course you are right that there is no rule that you must call 'close' but as you said it is nice to call it to free all unused resources sooner. Otherwise for example files and sockets remain open until GC activates and call 'finalize' methods of such classes as FileInputStream or SocketImpl. My InputStream subclass also calls 'close' from 'finalize' so I agree that there is no memory leak, but as my protocol handler can open only one InputStream at the same time, everything works very slowly.

Regards,
Lukasz Matuszczak


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to