mirror of
https://github.com/meineerde/rackstash.git
synced 2025-12-27 18:01:14 +00:00
This helps in ensuring thread-safety when flushing unbuffered Buffers. Previously, it was possibly for client code to still hold references to fields on a flushed and cleared buffer, potentially resulting in unintended side-effects if the client code was not aware that the buffer was cleared. By creating ompletely new object instances, existing references only point to data from before the clear. This ensures a clean cut.