public void Dispose() { if (this._handleRef.Handle != IntPtr.Zero) { ProducerWrap.DestroyProducer(this._handleRef); this._handleRef = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } }
public bool DestroyProducer() { var destroyResult = ProducerWrap.DestroyProducer(this._handleRef); if (this._diagnosticListener?.IsEnabled(ConstValues.RocketMQProducerDestroy) ?? false) { this._diagnosticListener.Write(ConstValues.RocketMQProducerDestroy, new { destroyResult }); } return(destroyResult == 0); }