( Please if I'm wrong with my understanding of this rectify me )
Reading about good and bad programming practices I heared that when calling a ShowDialog
method (at least in a normal Windows.Form
) that Form
is not disposed after the DialogResult
is sent, the Form
remain in memory so it will be disposed manually, well, then following that good practices that is was I'm trying to do with a RadForm
, this is the code:
ConfigureCorner.ShowDialog() = Windows.Forms.DialogResult.OK
The problem is that every time that I call ShowDialog
after the Form is disposed for first time the memory increases like 5-10 mb each time, and it needs much execution time to display the Form
and its controls.
I attached an image to show the Form
contents, but his is the detailed content of the RadForm
· 3 different themes
· 15 RadButtons
· 5 RadCheckBoxes
· 1 RadDropDownList
· 8 RadGroupBoxes
· 21 RadLabels
· 1 RadPageView
· 12 RadPageViewPages
· 2 RadRadioButtons
· 12 RadSeparators
· 8 RadTextBoxControls
· 2 Custom dialogs for open folder/files.
As you see seems that I'm not using anything special that should 'cause this memory leak,
the images of the controls are set directlly in the designer property grid as 'Image'
I'm not loading or instancing any disposable object before closing the RadForm
Also, I'm trying to force garbage collecting aftear each call to Dispose
method after calling ShowDialog
, but that does not solve anything:
This is normal?
Any information will be very appreciated, thanks in advance.