Stealth Player Development

My MicroISV. Where software development and pornography collide...

Subscribe in NewsGator Online

Saturday, January 15, 2005

Memory Problem Solved!

OK, so no sample, but I can explain the fix...

I am loading user controls into a panel as a "Page", when the user closes the page, I was removing the user control from it's host panel's Controls collection and then calling Dispose on the User Control...

After profiling the application I noticed that the Remove method on the ControlCollection calls Dispose on the control being removed. I don't know why calling dispose twice caused the finializer to never get called, but that was the problem. I removed my call to Dispose and it works like a charm.


Post a Comment

<< Home