예제 #1
0
        public void Dispose()
        {
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
            if (_formatConverter != null)
            {
                _formatConverter.Dispose();
                _formatConverter = null;
            }
#endif
        }
예제 #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
        }