D
David
How should sockets, filestreams, and anything else that needs to be closed
be handled using try/catch/finally blocks? The only solution I can see is
to make the objects public or use a public flag that the error handler can
set so that the rest of the cold can clean up after the error handler has
run (in my case when a hard close is performed my socket loses connection
and throws an error- I need to close it after the error so it can listen for
another connection.)
be handled using try/catch/finally blocks? The only solution I can see is
to make the objects public or use a public flag that the error handler can
set so that the rest of the cold can clean up after the error handler has
run (in my case when a hard close is performed my socket loses connection
and throws an error- I need to close it after the error so it can listen for
another connection.)