Memory management problem on compact framework 2.0SP1

F

franck

Hello everybody,

I've a memory management problem. We wrote a c# application that uses an sql
ce database with a lot of datasets and uses MS merge replication.
The problem is that during the use of the application the memory in use wil
grow and will never become lower, until the application crashes saying 'out
of mémory'.

Ive tried the Compact framework RPM but I don't find anything. I'tried
"using" keewords, manual disposing of my datasets and GC.collect() method.
Nothing will help me.

I've seen on the web that there is a bug in memory management when using
user control. I've tried to dispose them ma manually, but nothing seems to
work

Does anybody have an idea ?
 
S

Simon Hart [MVP]

Have you considered using a DataReader instead of DataSets as DataSets are
quite heavy and expensive.

How much data are we talking about in your application at anyone time,
number of rows etc? Then what are you doing with this data, Data Binding? as
Data Binding is sometimes not the answer for mobile devices (depending on how
much data you're processing of course).

See if this link helps, there might be some stuff in there you'll learn:
http://simonrhart.blogspot.com/2007/11/sql-server-ce-performance-tips.html

Just to let you know, you shouldn't really call GC.Collect ever, it is an
expensive call to make especially on a memory contrainted device. Let the CLR
take take of that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top