Example #1
0
        public void Dispose()
        {
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
            if (_formatConverter != null)
            {
                _formatConverter.Dispose();
                _formatConverter = null;
            }
#endif
        }
Example #2
0
        public void Dispose()
        {
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
            // Free the pinned buffer
            if (_ancPacketsBufferPtr != System.IntPtr.Zero)
            {
                _ancPacketsBufferHandle.Free();
                _ancPacketsBufferPtr = System.IntPtr.Zero;
            }
            // Free the pinned buffer
            if (_ancDataBufferPtr != System.IntPtr.Zero)
            {
                _ancDataBufferHandle.Free();
                _ancDataBufferPtr = System.IntPtr.Zero;
            }

            if (_formatConverter != null)
            {
                _formatConverter.Dispose();
                _formatConverter = null;
            }
#endif
        }