1

Are the database-related objects such as connection object, command object, datareader, dataadapter,... unmanaged resources?

1 Answer 1

1

The objects you refer to are part of the .NET framework, and are garbage-collectable. So in that sense they are managed resources.

A better question would be, do these objects implement IDisposable? If they do, you can use the using keyword in C# to clean them up once they go out of scope, or call their dispose() method manually.

An example of using the using keyword with SqlConnection and SqlDataAdapter objects is here:

http://weblogs.asp.net/jasonsalas/archive/2005/02/08/368811.aspx

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.