私の他のquestion here about Disposable objectsでは、使用ブロックの最後の前にClose()を呼び出す必要がありますか?SQLConnectionが破棄される前にClose()する必要がありますか?
using (SqlConnection connection = new SqlConnection())
using (SqlCommand command = new SqlCommand())
{
command.CommandText = "INSERT INTO YourMom (Amount) VALUES (1)";
command.CommandType = System.Data.CommandType.Text;
connection.Open();
command.ExecuteNonQuery();
// Is this call necessary?
connection.Close();
}
_this._poolGroup = null; _は接続が接続プールに戻っていないことを意味しますか?だから私はn-1の接続を持つでしょうか? –