views:

20

answers:

1

I'm accessing a database in steps, and making sure that I dispose of all my DbConnection objects & related when I've done with them; however, when all the network stuff is done & should all be closed I still find open network connections from the app on netstat. How do I find out what class instance is keeping these connections open?

A: 

Even though you are calling the Close method on your connection, the physical connection doesn't necessarily get closed due to connection pooling.

Otávio Décio
Could you explain connection pooling in more detail?
thecoop
Pooling is explained in detail here: http://msdn.microsoft.com/en-us/library/8xx3tyca.aspx. It optimizes data access by keeping physical connections open because closing and opening them are expensive processes.
Otávio Décio