Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET IMAP

 AfterLogic Forum : MailBee.NET IMAP
Subject Topic: Release memory - DownloadEntireMessage? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
ramiss
Newbie
Newbie
Avatar

Joined: 18 March 2009
Location: United States
Online Status: Offline
Posts: 5
Posted: 23 February 2012 at 2:03pm | IP Logged Quote ramiss

Hi,

We are using BeginDownloadEnvelopes on a folder that contains 33,000 messages. Obviously this is hugely memory intensive.

I am experimenting with a loop that calls the BeginDownloadEntireMessage followed by SourceEnvelopes = EndDownloadEntireMessage in 1,000 message chunks. At the end of each loop cycle I am calling SourceEnvelopes.Clear() and setting the BeginDownloadEntireMessage object = nothing.

The loop works great but the memory usage of the application (as shown in Task Manager) keeps climbing until everything eventually crashes. I am even calling GC.Collect() AND disconnecting/reconnecting at the end of each loop cycle with no reduction in memory.

Is there any way to release memory resources?

Thanks!

Richard
Back to Top View ramiss's Profile Search for other posts by ramiss
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 25 February 2012 at 2:58am | IP Logged Quote Alex

"BeginDownloadEntireMessage object = nothing." what object are you talking about? I'd set SourceEnvelopes=Nothing and then GC.Collect.

BTW, there is no need to reconnect for each loop (unless your processing of 1000 emails takes too long to keep the connection open).

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide