mirror of
https://github.com/Radarr/Radarr
synced 2026-01-17 13:03:26 +01:00
Fixed: DataMapper potentially leaking stuff when being disposed.
This commit is contained in:
parent
8e7b718209
commit
09899fcf6c
1 changed files with 12 additions and 12 deletions
|
|
@ -941,21 +941,21 @@ protected virtual void Dispose(bool disposing)
|
|||
{
|
||||
if (disposing)
|
||||
{
|
||||
if (Command.Transaction != null)
|
||||
if (_command != null)
|
||||
{
|
||||
Command.Transaction.Dispose();
|
||||
Command.Transaction = null;
|
||||
}
|
||||
if (_command.Transaction != null)
|
||||
{
|
||||
_command.Transaction.Dispose();
|
||||
_command.Transaction = null;
|
||||
}
|
||||
|
||||
if (Command.Connection != null)
|
||||
{
|
||||
Command.Connection.Dispose();
|
||||
Command.Connection = null;
|
||||
}
|
||||
if (_command.Connection != null)
|
||||
{
|
||||
_command.Connection.Dispose();
|
||||
_command.Connection = null;
|
||||
}
|
||||
|
||||
if (Command != null)
|
||||
{
|
||||
Command.Dispose();
|
||||
_command.Dispose();
|
||||
_command = null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue