예제 #1
0
        /// <summary>
        /// Frees memory and handles allocated for the module.
        /// </summary>
        public override void Dispose()
        {
            _isDisposed = true;

            if (IsImageOwner)
            {
                _module.Dispose();
            }
        }
예제 #2
0
        /// <summary>
        /// Frees memory and handles allocated for the module.
        /// </summary>
        public override void Dispose()
        {
            _isDisposed = true;

            if (IsImageOwner)
            {
                _module.Dispose();

                var onDispose = Interlocked.Exchange(ref _onDispose, null);
                onDispose?.Invoke();
            }
        }