I have large XML Files that I parse and create records in a SQL Database. Each of these records are stored in the file as an item (<Item> blah blah </Item>). So, I loop thru the file reading each record. Something like this...
Set NodeList = xmlDoc.documentElement.selectNodes("Item")
For Each Node in NodeList
Set Node = Nothing
Set NodeList = Nothing
Set xmlDoc = Nothing
The problem is, the operation is consuming a lot of memory and is not releasing, even though I am setting every object I am using to Nothing. Eventually, I run out of memory before I am done processing my file and it crashes saying "out of memory"
What am I doing wrong? Does MSXML leak memory or is it something that I am not accounting for?? Can somebody help?