public void Dispose() { if (nativePacket != IntPtr.Zero) { Native.enet_packet_destroy(nativePacket); nativePacket = IntPtr.Zero; } }
public void Dispose() { if (_packet != null) { if (_packet->referenceCount == IntPtr.Zero) { Native.enet_packet_destroy(_packet); } _packet = null; } }