c-client IMAP API and memory

2002-12-10 Thread Guillaume Vaillant
Hello, I'm a new user of the c-client API and I need help to manage memory leaks on my application. I use for example the mail_fetchbody_full function which return a (char *) data. I want to know if I have to free this pointed memory or not ? It's not the only one function for which i don't know

Re: c-client IMAP API and memory

2002-12-10 Thread Shawn Walker
Hello, You need to run the garbage collector to get the cclient to free the memory. To do the following code after you call mail_fetchbody_full(). // Run the garbage collection to free up memory in cclient mail_parameters(MailStream, SET_GETS, nil); mail_gc(MailStream, GC_TEXTS); On

Re: c-client IMAP API and memory

2002-12-10 Thread Mark Crispin
On Tue, 10 Dec 2002, Shawn Walker wrote: You need to run the garbage collector to get the cclient to free the memory. To do the following code after you call mail_fetchbody_full(). mail_parameters(MailStream, SET_GETS, nil); mail_gc(MailStream, GC_TEXTS); This is an extremely BAD idea,

Re: c-client IMAP API and memory

2002-12-10 Thread Mark Crispin
On Tue, 10 Dec 2002, Shawn Walker wrote: Then how does one get cclient to free the memory after it retrieve a VERY large message from the server? I debugged into cclient saw how the message is being stored in memory and how to free it and the only way was to run the garbage collector. What

Re: c-client IMAP API and memory

2002-12-10 Thread Shawn Walker
On 12/10/2002 at 10:47 AM Mark Crispin wrote: On Tue, 10 Dec 2002, Shawn Walker wrote: Then how does one get cclient to free the memory after it retrieve a VERY large message from the server? I debugged into cclient saw how the message is being stored in memory and how to free it and the only

Re: c-client IMAP API and memory

2002-12-10 Thread Mark Crispin
On Tue, 10 Dec 2002, Shawn Walker wrote: That is the problem. I have had several customers running low on resources when the application was downloading a very large INBOX folder (the folder contains several thousands messages with very large messages that contains attachments). Why is the

Re: c-client IMAP API and memory

2002-12-10 Thread Shawn Walker
On 12/10/2002 at 11:11 AM Mark Crispin wrote: On Tue, 10 Dec 2002, Shawn Walker wrote: That is the problem. I have had several customers running low on resources when the application was downloading a very large INBOX folder (the folder contains several thousands messages with very large