Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified ByteArrayBuilder.Clear() to downsize its buffer if it has gr…
…own too large One potential problem with reusing ByteArrayBuilders is that, because they can grow for some abnormally long tokens/lines/commands/etc, those oversized buffers will remain referenced by the ImapStream/ImapEngine until they are disposed which could be the life of the program. If we oportunistically scale back the size of the buffers when they are Clear()'d, then we can periodically reduce memory usage and allow those larger buffers to be used elsewhere.
- Loading branch information