Related to asynchronous IO using a (bidirectional) NetworkStream, MSDN says that \"EndRead must be called once for every call to BeginRead.\"
Is this true even for c
GCHandle
s pinning your buffers and some other unmanaged resources are released by the completion port callback. The unmanaged OVERLAPPED
structure will hang around until the IAsyncResult
gets finalized. This may be tolerable if the network load in your application is not large, but may become a problem if your application handles many connections per second, because finalization happens only after a full GC collection and on a separate thread.
NB: these are implementation details, obtained with Reflector. Caveat emptor.