DataSet.ReadXML

G

Guest

I have a small xml document that I bring into my application by reading the
xml file with a dataset:

Dim ds As New DataSet
ds.ReadXml(fileName)
' Do some work with the tables in the dataset
ds.Close()
ds.Dispose()

The data is fine, and I can use the tables in the dataset with no problems.
However, if I put this in a loop I noticed that the memory usage goes up by
about 150KBytes each time the ds.ReadXml method executes. The total size of
the xml file is about 1KByte. My application is a Windows Service that will
hit this 4 to 5 times a hour, so I can't afford any memory growth. The
memory leak (if that is what it is) is a direct result of the ds.ReadXml
method.

Anyone have any ideas?
Thanks for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top