B
bleedledeep
I've been tracking down a memory leak using DevPartner 7.2 and what I
am seeing is that calling XmlDocument.Load() leaks A LOT of memory.
The following code is called when I click a button on my test form.
(this is test code I wrote to confirm the bug, not my actual code)
private void button1_Click(object sender, System.EventArgs e)
{
XmlDocument xd = new XmlDocument();
for ( int i = 0; i < 10; i++ )
{
xd.Load( "test.xml" ) ;
Thread.Sleep( 1000 );
}
}
"test.xml" is 8525 bytes.
Each time xd.Load( "test.xml" ) is called, approx 114,000 bytes are
leaked. When I force GC with the DevPartner GUI, all but one of those
are collected, but I am still out 114,000 bytes. I have tried putting
System.GC.Collect() after the Sleep call, but the behavior does not
change.
I am using 2003, does 2005 fix this? Is there a patch? A work around?
Any info greatly appreciated.
am seeing is that calling XmlDocument.Load() leaks A LOT of memory.
The following code is called when I click a button on my test form.
(this is test code I wrote to confirm the bug, not my actual code)
private void button1_Click(object sender, System.EventArgs e)
{
XmlDocument xd = new XmlDocument();
for ( int i = 0; i < 10; i++ )
{
xd.Load( "test.xml" ) ;
Thread.Sleep( 1000 );
}
}
"test.xml" is 8525 bytes.
Each time xd.Load( "test.xml" ) is called, approx 114,000 bytes are
leaked. When I force GC with the DevPartner GUI, all but one of those
are collected, but I am still out 114,000 bytes. I have tried putting
System.GC.Collect() after the Sleep call, but the behavior does not
change.
I am using 2003, does 2005 fix this? Is there a patch? A work around?
Any info greatly appreciated.