S
Sidebp
I have written an app for a pocketpc in vb.net. The problem I have
is that every time i open a new form, resources get used and never
released.
I have confirmed i have set everything on the form to nothing. I have
also tried opening the form using showDialog and then calling Dispose
on the form afterwards but i still seem to lose memory.
The following shows the memory usage each time I open a form:
Memory Load Mem Free
46% 10551296
48% 10256384
48% 10129408
51% 99854234
This wouldnt be a problem but it is expected that the app will be used
for a long time and the form will be opened and closed numerous times.
The same situation occurs for any other forms I open.
So my question is:
Could someone supply me with an example of the best way to:
a) open a form
b) close it and dispose of it properly
I know it sounds like a trivial task but I cant figure out where my
resources are going!
Over a course of time I eventually get an out of memory exception so
there must still be links to the form objects and hence they're not
getting picked up by the GC.
Many thanks.
is that every time i open a new form, resources get used and never
released.
I have confirmed i have set everything on the form to nothing. I have
also tried opening the form using showDialog and then calling Dispose
on the form afterwards but i still seem to lose memory.
The following shows the memory usage each time I open a form:
Memory Load Mem Free
46% 10551296
48% 10256384
48% 10129408
51% 99854234
This wouldnt be a problem but it is expected that the app will be used
for a long time and the form will be opened and closed numerous times.
The same situation occurs for any other forms I open.
So my question is:
Could someone supply me with an example of the best way to:
a) open a form
b) close it and dispose of it properly
I know it sounds like a trivial task but I cant figure out where my
resources are going!
Over a course of time I eventually get an out of memory exception so
there must still be links to the form objects and hence they're not
getting picked up by the GC.
Many thanks.