diff --git a/src/Layers/xrRender/NvTriStripObjects.h b/src/Layers/xrRender/NvTriStripObjects.h index 9fd29607915..75c34a9627c 100644 --- a/src/Layers/xrRender/NvTriStripObjects.h +++ b/src/Layers/xrRender/NvTriStripObjects.h @@ -73,7 +73,7 @@ class NvEdgeInfo { if (--m_refCount == 0) { - Memory.mem_free(this); + delete this; } } diff --git a/src/Layers/xrRender/xr_effgamma.cpp b/src/Layers/xrRender/xr_effgamma.cpp index bb1a2c874bf..427cf8c53fe 100644 --- a/src/Layers/xrRender/xr_effgamma.cpp +++ b/src/Layers/xrRender/xr_effgamma.cpp @@ -12,12 +12,15 @@ void CGammaControl::Update() IDXGIOutput* pOutput; CHK_DX(HW.m_pSwapChain->GetContainingOutput(&pOutput)); + // Метод выполнится успешно только в полноэкранном режиме. HRESULT hr = pOutput->GetGammaControlCapabilities(&GC); if (SUCCEEDED(hr)) { GenLUT(GC, G); pOutput->SetGammaControl(&G); } + + _RELEASE(pOutput); } } diff --git a/src/Layers/xrRenderDX10/dx10HW.cpp b/src/Layers/xrRenderDX10/dx10HW.cpp index 8411629f05e..f69e4fe4b9e 100644 --- a/src/Layers/xrRenderDX10/dx10HW.cpp +++ b/src/Layers/xrRenderDX10/dx10HW.cpp @@ -155,8 +155,6 @@ void CHW::CreateDevice(HWND m_hWnd, bool move_window) D3D_DRIVER_TYPE_UNKNOWN, // Если мы выбираем конкретный адаптер, то мы обязаны использовать D3D_DRIVER_TYPE_UNKNOWN. NULL, createDeviceFlags, pFeatureLevels, sizeof(pFeatureLevels) / sizeof(pFeatureLevels[0]), D3D11_SDK_VERSION, &pDevice, &FeatureLevel, &pContext); - - R_CHK(m_pFactory->CreateSwapChain(pDevice, &sd, &m_pSwapChain)); #else R = D3D10CreateDevice(m_pAdapter, m_DriverType, NULL, createDeviceFlags, D3D10_SDK_VERSION, &pDevice); @@ -225,7 +223,7 @@ void CHW::DestroyDevice() #ifndef USE_DX11 _RELEASE(HW.pDevice1); #endif - _SHOW_REF("DeviceREF:", HW.pDevice); + _SHOW_REF("refCount:HW.pDevice:", HW.pDevice); _RELEASE(HW.pDevice); DestroyD3D();