J
Jon Brunson
Hi all,
From what I understand, GC kicks in either:
a) When your app loses focus, or
b) When you get a OutOfMemoryException, it collects and trys the call
again, truly throwing the exception if there's still not enough memory.
Are there any other times (other than calling GC.Collect() directly)
when collection takes place? And if not, if our app never loses focus
(the devices sole purpose is to run our app), would it be sensible (I
know it's frowned upon) for us to call GC.Collect()?
Additionally, the OutOfMemoryException stuff, does ADO.NET do the same?
I ask coz all of our memory troubles are coming from SqlCe, and I'd like
to clean the memory before opening Readers/filling DataTables, etc.
Thanks for reading, and I hope I've made some kind of sense!
-Jon
From what I understand, GC kicks in either:
a) When your app loses focus, or
b) When you get a OutOfMemoryException, it collects and trys the call
again, truly throwing the exception if there's still not enough memory.
Are there any other times (other than calling GC.Collect() directly)
when collection takes place? And if not, if our app never loses focus
(the devices sole purpose is to run our app), would it be sensible (I
know it's frowned upon) for us to call GC.Collect()?
Additionally, the OutOfMemoryException stuff, does ADO.NET do the same?
I ask coz all of our memory troubles are coming from SqlCe, and I'd like
to clean the memory before opening Readers/filling DataTables, etc.
Thanks for reading, and I hope I've made some kind of sense!
-Jon