.. which could be a problem when there is a lot of sstables, when using LCS for example.
SSTableWriter calls SSTableMetadata.Collector.updateMin(Max)ColumnNames passing List of ByteByffers which reference a small byte array in slab region.
ColumnNameHelper.mergeMin(Max) just returns a reference of column name back to SSTableMetadata. So the latter keeps whole slab region referenced, preventing it from being GCed.
Fixed it by making copies of column name bytebuffer, if its size more than column name itself.