예제 #1
0
 private void Current_Suspending(object sender, Windows.ApplicationModel.SuspendingEventArgs e)
 {
     if (isDXInitialized)
     {
         this.deviceContext.ClearState();
         using (DXGI.Device3 dxgiDevice3 = this.device.QueryInterface <DXGI.Device3>())
             dxgiDevice3.Trim();
     }
 }
예제 #2
0
 private void Application_Suspending(object sender, Windows.ApplicationModel.SuspendingEventArgs e)
 {
     if (isDXInitialized)
     {
         this.deviceContext.ClearState();
         using (DXGI.Device3 dxgiDevice3 = this.swapChain.GetDevice <DXGI.Device3>())
         {
             dxgiDevice3.Trim();
         }
     }
 }
예제 #3
0
        private void Application_Suspending(object sender, Windows.ApplicationModel.SuspendingEventArgs e)
        {
            // Check if resources have been initialized.
            if (isDXInitialized)
            {
                // Clear any object references.
                this.deviceContext.ClearState();

                // Trim the memory.
                using (DXGI.Device3 dxgiDevice3 = this.swapChain.GetDevice <DXGI.Device3>())
                {
                    dxgiDevice3.Trim();
                }
            }
        }
예제 #4
0
 /// <summary>
 /// When the app is suspended, UWP apps should call Trim so that the DirectX data is cleaned.
 /// </summary>
 void Trim()
 {
     _device3?.Trim();
 }