public void ForEachByteUnderLeakDetectionShouldNotThrowException() { CompositeByteBuffer buf = (CompositeByteBuffer)NewBuffer(8); Assert.True(buf is SimpleLeakAwareCompositeByteBuffer); CompositeByteBuffer comp = (CompositeByteBuffer)NewBuffer(8); Assert.True(comp is SimpleLeakAwareCompositeByteBuffer); IByteBuffer inner = comp.Allocator.DirectBuffer(1).WriteByte(0); comp.AddComponent(true, inner); buf.AddComponent(true, comp); Assert.Equal(-1, buf.ForEachByte(new AlwaysByteProcessor())); Assert.True(buf.Release()); }