We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Question about datatable objects and releasing resources for same

rutledgj
rutledgj asked
on
Medium Priority
229 Views
Last Modified: 2012-05-11
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?
Comment
Watch Question

CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014

Commented:
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.