G
Guest
I have a Pocket PC app that is coming up with a outofmemory exception.
Bacially it loads a big document and everything is enclosed in a big object
that gets mouse events and paint events from a panel. I also use one global
form and reuse this all the time to display a set of forms all defined in the
big document. There is no unmanaged code, no multithreading, and it is all
pretty basic .NET stuff.
When I set the big object to nothing (getting rid of all the references and
event hook ups), and dispose of the form (because they normally hold some odd
references to things) and run a GC.Collect(), I expected the GC to be able to
collect everything. My understanding from hours reading about the GC is that
it collects everything that hasnt got a reference from the roots.
Why therefore do I lose about 1Mb each time I open and close one of these
big documents. I guess thats too hard - lets rephrase.
Do I need to 'manually' dispose of everything with a dispose option?
Is there something better than ce remote heap walker (whichy doesnt work
here probably because it is too big) for debugging?
Is dumping a whole set of stuff acceptable practice, seams very neat to me?
Could the Form somehow retain a reference to some of the controls that are
since moved from it, even after disposal?
I'll be notified of your gratefully recieved replies.
Bacially it loads a big document and everything is enclosed in a big object
that gets mouse events and paint events from a panel. I also use one global
form and reuse this all the time to display a set of forms all defined in the
big document. There is no unmanaged code, no multithreading, and it is all
pretty basic .NET stuff.
When I set the big object to nothing (getting rid of all the references and
event hook ups), and dispose of the form (because they normally hold some odd
references to things) and run a GC.Collect(), I expected the GC to be able to
collect everything. My understanding from hours reading about the GC is that
it collects everything that hasnt got a reference from the roots.
Why therefore do I lose about 1Mb each time I open and close one of these
big documents. I guess thats too hard - lets rephrase.
Do I need to 'manually' dispose of everything with a dispose option?
Is there something better than ce remote heap walker (whichy doesnt work
here probably because it is too big) for debugging?
Is dumping a whole set of stuff acceptable practice, seams very neat to me?
Could the Form somehow retain a reference to some of the controls that are
since moved from it, even after disposal?
I'll be notified of your gratefully recieved replies.