When an active (still connected) StreamSocket object goes out of scope, an abortive (non-graceful) disconnect may result, which can lead to previously-sent data being discarded before it is read by the remote peer. It is strongly recommended that StreamSocket instances be explicitly closed before they go out of scope (e.g., before application exit).