title: .net Out of Memory exceptions in Windows Mobile - how to overcome this problem?
body: <p>I am currently writing a small application in Windows Mobile using CF.NET.</p>
  
  <p>The application is very similar in its behaviour to an e-mail application i.e. I am using POP3 to download messages and attachments from my mail-server account to store on the storage-card for further processing with a MIME-tool.</p>
  
  <p>My problem is downloading large attachments because at a certain point I get an OutOfMemory-exception. I found out some interesting things about this by reading the following question and answers published <a href="https://stackoverflow.com/questions/673526/sql-ce-outofmemoryexception-consuming-web-service" title="here">here on SO</a> the other day. Since my attachments can amount to 4-5MB (mp3-songs), I realize that I have serious problems. However, at the same time Pocket Outlook is able to download mp3-songs up to 4-5MB without any problems (using a WIFI-connection) so there must be a way to do it!</p>
  
  <p>At the moment, I am saving the download-buffer (converted into string) into a simple string-variable. I tried adding the content of the buffer into a stringbuilder but I still get OutOfMemory-exceptions.</p>
  
  <p>What strategy/technique could I adapt to overcome this problem? </p>