diff --git a/src/main/java/net/openhft/chronicle/hash/serialization/internal/CopyingMetaBytesInterop.java b/src/main/java/net/openhft/chronicle/hash/serialization/internal/CopyingMetaBytesInterop.java index 2b7022e84..292e03038 100644 --- a/src/main/java/net/openhft/chronicle/hash/serialization/internal/CopyingMetaBytesInterop.java +++ b/src/main/java/net/openhft/chronicle/hash/serialization/internal/CopyingMetaBytesInterop.java @@ -137,6 +137,7 @@ public abstract class CopyingMetaBytesInterop extends BasicCopyingMetaByte CopyingMetaBytesInterop originalMetaWriter, W writer, E e) { DirectBytesBuffer.ForBytesWriter forBytesWriter = provider.get(copies, originalMetaWriter.buffer()).forBytesWriter; + forBytesWriter.buffer.obtain(writer.size(e)); forBytesWriter.init(writer, e, mutable, maxSize); return forBytesWriter; }