Javamail - was there a store.close () effect in open folders?

I am using javamail to connect IMAP to gmail. Everything works well. I just want to prevent server memory misuse.

My question is: what happens when I close the store? [store.close ();] does it close all open folders? Do you need to close all folders?

There are huge speed advantages if I leave an open folder.

+3
source share
1 answer

from Javamail API Documentation

" . ConnectionEvent ConnectionListeners. (, ..), , . , , MessagingException."

, , folder.open, , :

if(!folder.isOpen()){folder.open();}

,

+1

Source: https://habr.com/ru/post/1785528/


All Articles