Exemple #1
0
        /// <summary>
        /// Releases all unmanaged and optionally managed resources used by the current instance of the <see cref="Emulator"/> class.
        /// </summary>
        /// <param name="disposing"><c>true</c> to dispose managed resources.</param>
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            try { Bindings.Close(Handle); }
            catch { Debug.WriteLine("Bindings.Close() threw an exception."); }

            _disposed = true;
        }
Exemple #2
0
        /// <summary>
        /// Releases all unmanaged and optionally managed resources used by the current instance of the <see cref="Emulator"/> class.
        /// </summary>
        /// <param name="disposing"><c>true</c> to dispose managed resources.</param>
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            //NOTE: Might consider throwing an exception here?
            try
            {
                Bindings.Close();
            }
            catch (Exception)
            {
                Debug.WriteLine("Closing of unicorn engine handle threw an exception.");
            }

            _disposed = true;
        }