Hi,
I have 2 forms frm_main and frm_search. I have an issue regarding the memory management (outOfMemory exception)
From a main form (frm_main) I am opening a new form through a button click event handler. Below is the code for this procedure
Private Sub BtnOpen_click (...) handles btnOpen.click
dim frm_mysearch as new frm_search
try
with frm_mysearch
.mdiparent = me
.show()
catch ex as exception
finally
frm_mysearch = Nothing
end with
end try
end sub
When I close the frm_mysearch form, through frm_mysearch.dispose() and frm_mysearch = nothing, I always realize that the process'
memory usage(seen in Task manager) never decreases; so opening the form multiple times leads to an outOfMemory exception.
I have tried calling the garbage collector after disposing the form, but the problem persisted.
Your help is appreciated.
Regards
I have 2 forms frm_main and frm_search. I have an issue regarding the memory management (outOfMemory exception)
From a main form (frm_main) I am opening a new form through a button click event handler. Below is the code for this procedure
Private Sub BtnOpen_click (...) handles btnOpen.click
dim frm_mysearch as new frm_search
try
with frm_mysearch
.mdiparent = me
.show()
catch ex as exception
finally
frm_mysearch = Nothing
end with
end try
end sub
When I close the frm_mysearch form, through frm_mysearch.dispose() and frm_mysearch = nothing, I always realize that the process'
memory usage(seen in Task manager) never decreases; so opening the form multiple times leads to an outOfMemory exception.
I have tried calling the garbage collector after disposing the form, but the problem persisted.
Your help is appreciated.
Regards