I’ve created a winform application with lots of forms, (in mdi and dialog)
but every time a close a form it stays in the memory,
so I would like to use de .Dispose() option.
but I don’t want to add this code to ALL of the forms,
I just want to place one code that’s activates on a FormClose command,
can i use en override.onFormClose command?
and where in the application do I put this code,
I tried it at the MDI form, but without success
Thanks,
Bram
ps
i’m using DevExpress components
If you call GC.Collect() and the forms are still in memory, then it is because there is a reference held to them somewhere.
You need to trace all references and make sure they are being released.