I\'ve been googling for the past few hours and trying different things but can\'t seem to the bottom of this....
When I run this code, the memory usage continuously
I think moving the XMLSerializer constructor outside the loop and caching its result will fix it, explanation here
XMLSerializer