Exemplo n.º 1
0
        /// <summary>
        /// Disposes of the resources that have been acquired by the command queue.
        /// </summary>
        /// <param name="disposing">Determines whether managed object or managed and unmanaged resources should be disposed of.</param>
        protected override void Dispose(bool disposing)
        {
            // Checks if the device has already been disposed of, if not, then the device is disposed of
            if (!this.IsDisposed)
            {
                DevicesNativeApi.ReleaseDevice(this.Handle);
            }

            // Makes sure that the base class can execute its dispose logic
            base.Dispose(disposing);
        }
Exemplo n.º 2
0
        /// <summary>
        ///     Disposes of the resources that have been acquired by the command queue.
        /// </summary>
        /// <param name="disposing">Determines whether managed object or managed and unmanaged resources should be disposed of.</param>
        public override void Dispose()
        {
            // Checks if the device has already been disposed of, if not, then the device is disposed of
            if (!IsDisposed)
            {
                DevicesNativeApi.ReleaseDevice(Handle);
            }

            // Makes sure that the base class can execute its dispose logic
            base.Dispose();
        }