public override void Close()
{
DB2Transaction transaction = null;
if (refTransaction != null)
{
transaction = (DB2Transaction)refTransaction.Target;
}
if ((transaction != null) && refTransaction.IsAlive)
{
transaction.Dispose();
}
if (refCommands != null)
{
for (int i = 0; i < refCommands.Count; i++)
{
DB2Command command = null;
if (refCommands[i] != null)
{
command = (DB2Command)((WeakReference)refCommands[i]).Target;
}
if ((command != null) && ((WeakReference)refCommands[i]).IsAlive)
{
try
{
command.ConnectionClosed();
}
catch { }
}
//?? refCommands[i] = null;
}
}
InternalClose();
}