Avoiding memory problems 
Author Message
 Avoiding memory problems

Hello,

I am writing an email application in VC++ .Net.  I have come across a
problem, when downloading mail into a CString, that I run out of memory,
especially if there are any large file attachments.

I was wondering if there was any way I could save these large emails
gradually as I am downloading, in other words transferring out of memory and
onto disk, as I go.

NB the emails are stored in an Access database, if it makes any difference.

I have no idea how to do the above, and would appreciate advice.

Thanks,
Trimtrom



Mon, 12 Sep 2005 01:48:10 GMT  
 Avoiding memory problems

Quote:

> Hello,

> I am writing an email application in VC++ .Net.  I have come across a
> problem, when downloading mail into a CString, that I run out of memory,
> especially if there are any large file attachments.

> I was wondering if there was any way I could save these large emails
> gradually as I am downloading, in other words transferring out of memory and
> onto disk, as I go.

> NB the emails are stored in an Access database, if it makes any difference.

> I have no idea how to do the above, and would appreciate advice.

> Thanks,
> Trimtrom

CString runs out of memory at the same time your computer runs out of
memory.  

You may have noticed that standard email clients do exactly what you are
wondering about, so of course there is a way.  But a bit more detail
about how you are receiving the email and how you are allocating the
memory would be needed to understand your problem.

--
Scott McPhillips [VC++ MVP]



Mon, 12 Sep 2005 03:09:45 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Avoiding memory problems

2. Avoiding memory problems

3. Avoiding memory leaks

4. Using SysFreeString to avoid memory leak?

5. Avoid memory leaks?

6. Avoiding MFC memory leak dumps?

7. How to avoid the Memory leak when quit app

8. How to avoid the Memory leak when quit app

9. Avoiding MFC memory leak dumps?

10. Read file to array problem (Newbie for those wishing to avoid)

11. Linkage Problem: trying to avoid unresolved externals

12. Problem in Avoiding multiple instance!!

 

 
Powered by phpBB® Forum Software