We have some memory leaks in our application and I've been tasked with tracking them down using Memory Profiler (what a fantastic piece of software, and you can quote me). The issue is that after using our app for a span of time, our testers get crashes siting an Error Creating Window Handles. We assume we're not properly disposing of our controls and so we've been working with disposing our forms properly. It's not quite there yet, however. Our app has a main form which opens custom controls (which themselves contain many smaller controls- textboxes and the like). The custom controls get closed and opened many times over the course of using the application.
I don't know how big this'll be, but here's a screenshot of a profiler run:
Something I can't seem to get to go away are these EventHandlerList+ListEntry and PropertyStore instances. It seems like these might be keeping our controls in memory (and holding onto their window handles) and causing crashes. Does anyone have experience seeing these in the profiler and if so what was done to dispose of them? I can send more information if necessary. Thanks.