IByteBuffer Wrap(IByteBuffer buffer) { var tracker = new NoopResourceLeakTracker(); IByteBuffer leakAwareBuf = this.Wrap(buffer, tracker); this.trackers.Enqueue(tracker); return(leakAwareBuf); }
internal sealed override IByteBuffer Wrap(CompositeByteBuffer buffer) { var tracker = new NoopResourceLeakTracker(); var leakAwareBuf = (WrappedCompositeByteBuffer)this.Wrap(buffer, tracker); this.trackers.Enqueue(tracker); return(leakAwareBuf); }
public override void Dispose() { base.Dispose(); for (; ;) { NoopResourceLeakTracker tracker = null; if (this.trackers.Count > 0) { tracker = this.trackers.Dequeue(); } if (tracker == null) { break; } Assert.True(tracker.Closed); } }