✅ the best way to clean up SqlConnection
Hey guys, basically i want to clean up the sql connection after done with querying stuff on each request, i put it in using block but i notice that the connection instance (SqlConnection) still there after gone out of the using scope, it looks like Garbage Collector doesn't clean them immediately. When i check how many active connection to my database, just a small amount of them like 3 or 4, but when i check it in Rider, there was like hundred of them allocated in memory, i guess they aren't cleaned up but rather than they are being deactived and remain there waiting for the Garbage Collector to clean up, so basically i want to explicity do it myself, what is the best practice here ? Thanks for reading


