Question as per title.
I have a piece of code that does this:
using (SqlConnection dbcon = new SqlConnection(connectionString)) using (SqlDataAdapter dataAdapter = new SqlDataAdapter(statement, dbcon)) { dat_set = new System.Data.DataSet(); dbcon.Open(); dataAdapter.Fill(dat_set, name); } when I force exit the program when the dataAdapter is still filling the data set, the program freeze and stop responding.
I know "using" block release the resource when they go out of scope, but in the case of force termination, does the resources get release gracefully?