memory leak with forms

R

roni

hi.

i try to solve memory leak issue with very simple application.
i disable most the code, but the memory leak continue.


my program do this :

i have 3 forms :

1.main form , always visible , and display panels.
2.form2 ,with panel and "Next" button on it
3.form3, with panel and "Back" button on it.

when app run, i start with form main , then create form1 and insert his
panel to form main.

when i hit the "next" button, i call
form1.dispose, form1=null
then create new form2 , and call mainform.controls.add(panelOfForm2).


now,when i click next and back more and more times, the memory of the smart
device, is grow..

how can i prevent that ? where is the memory leak ?

is there is somthing i miss about , destroy the buttons ? or the panels ?


any tips will be nice to read, cause im on this for 1 day..and dont have
clue...


have a nice day.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top