You should consider, that managed resources are allocated by managed environment and then by system, but unmanaged only by the system. So that is why the garbage collector leaving this to be destroyed by "Closeing or Destroying" resource.
Here is some article how interoperability works: http://msdn2.microsoft.com
SQLConnection object inherits from IDisposable interface, that provide Dispose() method, that as .NET documentation said is used for releaseing unmanaged resources, but it is often used to released heavy load of managed resources by developers.
I think the best way is to use this profiler to see how is your memory used:
http://msdn.microsoft.com/
You can even see memory usage of .NET with Process Explorer (tab at process properties) in compare of working set:
http://www.microsoft.com/t
Main Topics
Browse All Topics





by: bungHocPosted on 2007-11-08 at 01:46:17ID: 20239996
Too long.. I suggest you read it for yourself: /en-us/lib rary/ms973 872.aspx
archives3/ archive513 .html
http://msdn2.microsoft.com
http://www.csharphelp.com/