> From: mono-devel-list-boun...@lists.ximian.com [mailto:mono-devel-list- > boun...@lists.ximian.com] On Behalf Of Robert Jordan > > You may want to look up how a sane IDisposable pattern has to be > sensibly implemented in .NET. You'll find out that Dispose() > shouldn't be called from a finalizer.
Uhmm... You got that wrong. Here is the recommended pattern: https://msdn.microsoft.com/en-us/library/b1yfkh5e(v=vs.110).aspx Basically, *always* call Dispose(false) from the finalizer, if present, but avoid having a finalizer unless you need one. Fortunately, it looks like SslStream has no finalizer, so I guess the GC will never call any variant of SslStream.Dispose. So I guess it's no problem. > A blocking finalizer will hang the GC, but it looks like SslStream is > implementing finalization correctly: Finalization seems to be correct. But Dispose hangs. Doesn't seem to be the fault of SslStream, but one of the dispose methods that gets called, either directly or indirectly, from the SslStream Dispose method. _______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list