ShowDialog() memory leak workaround?

Unfortunately, there is no easy way to do this. What you have is bad code, and that bad code has to be corrected just like all other bad code: by fixing it and replacing it with good code. There are no band-aids to apply here; the band-aid is the finalizer of the Form calling Dispose() which is never guaranteed to happen.

If the object is ineligible for collection, then ANTS Memory Profiler will show you what's holding onto a reference to it.

Depending on how you use the forms after they have been closed (*), you can call Dispose() from within the FormClosed event handler.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions