diff options
author | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2016-02-22 23:19:28 -0800 |
---|---|---|
committer | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2016-02-22 23:19:28 -0800 |
commit | 006346a36c0c12497cd82708d58bb7018ee9e11c (patch) | |
tree | e692df629bbd2c80a193cb58799bb74800758db3 /src/core/imap/MCIMAPSession.cpp | |
parent | af0d0dd4f57ee0745bc1910ef35fc7b88bf20613 (diff) |
Memory usage tweaks
Diffstat (limited to 'src/core/imap/MCIMAPSession.cpp')
-rwxr-xr-x | src/core/imap/MCIMAPSession.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/imap/MCIMAPSession.cpp b/src/core/imap/MCIMAPSession.cpp index 466ff936..9fb80711 100755 --- a/src/core/imap/MCIMAPSession.cpp +++ b/src/core/imap/MCIMAPSession.cpp @@ -518,10 +518,12 @@ static void logger(mailimap * imap, int log_type, const char * buffer, size_t si return; bool isBuffer = isBufferFromLogType(log_type); - + if (isBuffer) { + AutoreleasePool * pool = new AutoreleasePool(); Data * data = Data::dataWithBytes(buffer, (unsigned int) size); session->connectionLogger()->log(session, type, data); + pool->release(); } else { session->connectionLogger()->log(session, type, NULL); |