Link to home
Start Free TrialLog in
Avatar of rutledgj
rutledgj

asked on

Question about datatable objects and releasing resources for same

I have a database helper class that returns a datatable to the calling method. In that database helper class function, I open the connection, load the newly declared datatable, close the connection and then return the table.

My question is what keeps this from causing problems with creating a new datatable each time this is called. Couldn't I possibly run out of resources if done hundreds or thousands of times?

If I set the datatable to nothing in the calling method when I'm finished does that take care of releasing the resources created in the database helper class?
ASKER CERTIFIED SOLUTION
Avatar of lludden
lludden
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial