J
jayderk
I have an application that goes back and forth between forms alot over the
course of a day and appears to have a memory leak like situation as I can go
to the form about 35 time and with 15208K of ram, it seems to be adding a
few more K every time or few times I open up a new one. I read some threads
explaining going between forms should be done in a create once use many
fashion. my problem with this is it is not very clean, once we are done with
a resource and not going to use it for a few hours possibly we should
release it back to the system. I have found a very clean way ( i think ) to
do this.
frmView frmViewR = new frmView();
frmViewR.ShowDialog();
frmViewR.Dispose();
frmViewR = null;
the memory seems to be alot more stable doing this..
can you guys see any major problems with this?
course of a day and appears to have a memory leak like situation as I can go
to the form about 35 time and with 15208K of ram, it seems to be adding a
few more K every time or few times I open up a new one. I read some threads
explaining going between forms should be done in a create once use many
fashion. my problem with this is it is not very clean, once we are done with
a resource and not going to use it for a few hours possibly we should
release it back to the system. I have found a very clean way ( i think ) to
do this.
frmView frmViewR = new frmView();
frmViewR.ShowDialog();
frmViewR.Dispose();
frmViewR = null;
the memory seems to be alot more stable doing this..
can you guys see any major problems with this?