Memory leak (yep, another one) with forms possibly

  • Thread starter Thread starter Tommy
  • Start date Start date
T

Tommy

I have a strange problem. I have what I consider a huge app for a ce/ppc
device. It contains 38 forms. Quite a few are designed to be reused.

I have a couple of forms that do queries on a sybase ASA db and pass the
dataset into another form for the user to go through the data and make mods.

The strange thing that is happening is if you keep going through the data
and get to the end, go back to the form that makes the query and back into
the editing form yet again,, over and over you steady lose memory until the
unit get's very slow.

I am definately closing and calling dispose of the edit form. I have removed
all references to the outside thinking maybe there was something referencing
one of those forms keeping it from going away. I changed the dataset being
passed and passing byval now instead of byref like I was.

I realize this is pretty vague to get much help on but i'm about at the end
of what I know to check.

I am using CF sp3. I tried it on a Ce device and a ppc device with the same
results.

Any ideas out there on where to go next with this?

Thanks
 
If you haven't read this, see if anything on it helps (e.g. have you used
perf counters):
http://www.danielmoth.com/Blog/2005/01/memory-problems-faq.html
Any ideas out there on where to go next with this?
The generic answer to your generic question applies in this case as well.
Keep going through the cycle of:
1. Remove code
2. Repeat test and measure
3. If problem persists go to step 1
4. The code you just removed was the culprit. Study it yourself or post a
small repro to the newsgroups to get others to help.

Cheers
Daniel
 
No. I read that was not necessary with dotnet. That supposedly went away
with vb6 and evb.

Is this not true? Then perhaps that is my problem.
 
A variable of a reference type can
1. have local scope (in a method)
2. be a field in a type

If you want the instance of the reference type it points to, to be eligible
for garbage collection then in the second case you have to set it to
null/nothing if the type containing the field remains in scope (or the field
was static). In the 1st case you don't.

Cheers
Daniel
 
Back
Top