Fix uninitialized values and release COM resources after use
This commit is contained in:
@@ -275,6 +275,7 @@ bool GPUDeviceDX11::Init()
|
||||
{
|
||||
AllowTearing = true;
|
||||
}
|
||||
factory5->Release();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -274,6 +274,7 @@ bool GPUDeviceDX12::Init()
|
||||
{
|
||||
AllowTearing = true;
|
||||
}
|
||||
factory5->Release();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,8 @@ GPUSwapChainDX12::GPUSwapChainDX12(GPUDeviceDX12* device, Window* window)
|
||||
, _windowHandle(static_cast<HWND>(window->GetNativePtr()))
|
||||
, _swapChain(nullptr)
|
||||
, _currentFrameIndex(0)
|
||||
, _allowTearing(false)
|
||||
, _isFullscreen(false)
|
||||
{
|
||||
ASSERT(_windowHandle);
|
||||
_window = window;
|
||||
|
||||
Reference in New Issue
Block a user