public void Recycle() { Buffers = null; Buffer = new ArraySegment <byte>(); PendingSize = 0; Message = null; Next = null; Promise = null; Count = -1; Cancelled = false; handle.Free(this); }
public void Run() { try { ChannelOutboundBuffer buffer = this.ctx.Channel.Unsafe.OutboundBuffer; // Check for null as it may be set to null if the channel is closed already if (EstimateTaskSizeOnSubmit) { buffer?.DecrementPendingOutboundBytes(this.size); } ChannelHandlerInvokerUtil.InvokeWriteAsyncNow(this.ctx, this.msg).LinkOutcome(this.promise); } finally { // Set to null so the GC can collect them directly this.ctx = null; this.msg = null; this.promise = null; // recycle _handle.Free(this); } }
public void Recycle() { Num = 0; Num2 = 0; _handle.Free(this); }