New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dispose SslStream in ShutdownSocket #275
Comments
RE: X509Certificate
Could start disposing it in builds that support |
This commit doesn't ensure that an ObjectDisposedException will be thrown if an object is used after it's disposed; a NullReferenceException or some other exception may be thrown instead. These are internal types that should always be used correctly in this code, so tracking incorrect use of Dispose is a low priority.
Fixed in 0.20.2. |
On .NET 4.6 and .NET Standard 1.0 (and later), X509Certificate implements IDisposable and should be disposed to free resources.
Fixed |
bgrainger commentedJun 20, 2017
It doesn't appear that the
SslStream
allocated inMySqlSession.InitSslAsync
is ever disposed. This might result in native memory leaks.We probably need to dispose the
X509Certificate2
allocated in that method, too.The text was updated successfully, but these errors were encountered: