When switching from a BytesIO to a file backed buffer, we were not
closing the old buffer after we had copied its contents. With this
change when we switch from a small buffer to a larger buffer or
vice-versa we will now attempt to close the old buffer.
When switching from a BytesIO to a file backed buffer, we were not closing the old buffer after we had copied its contents. With this change when we switch from a small buffer to a larger buffer or vice-versa we will now attempt to close the old buffer.
Closes: #357