OutOfMemoryException: Webservice, DataSet and file transport

G

Guest

Hi,

For transportation of a file, approx 850kB, I use a webservice which return
a dataset with one DataTable and a row. That row holds the file. After a
while I get an OutOfMemoryException on my Pocket PC device. The memory usage
increments exponential from 20MB -> 24MB, and my file is not that big.

Is this a known problem with the Compact Framework 1.0 SP2, on a Windows CE
4.2 device? Or by a certain memory allocation for the dataset?
Please any information is welcome.

Regards,
Tom
 
G

Guest

Pieter,

Do you mean that the SqlCeCommand objects needs to be disposed manually (by
calling .Dispose on code)? Are you sure the GC collector doesn't do it
automatically when getting rid of non-referenced objects?
 
G

Guest

Carlos,

Well, I had to insert around 5000 records in SQL Server CE, but after some
hundred records it failed because the device didn't have enough memory left.
By manually disposing the SqlCeCommand object each time, my problem was
solved. Maybe the GC comes in too late.

Pieter
 
G

Guest

Maybe you can try to transfer plain xml instead of transferring a dataset,
store it on the Pocket PC and parse it with an XmlReader. I don't know if
this will fit your needs, but it's worth trying.

Pieter
 

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