fix(windows): Memory leak when EnumAdapters1 uses dxgi::adapter_t address as parameter (#4340)
This commit is contained in:
parent
7ecb78177b
commit
d3af56d6fd
1 changed files with 3 additions and 2 deletions
|
|
@ -1059,8 +1059,9 @@ namespace platf {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
dxgi::adapter_t adapter;
|
dxgi::adapter_t::pointer adapter_p;
|
||||||
for (int x = 0; factory->EnumAdapters1(x, &adapter) != DXGI_ERROR_NOT_FOUND; ++x) {
|
for (int x = 0; factory->EnumAdapters1(x, &adapter_p) != DXGI_ERROR_NOT_FOUND; ++x) {
|
||||||
|
dxgi::adapter_t adapter {adapter_p};
|
||||||
DXGI_ADAPTER_DESC1 adapter_desc;
|
DXGI_ADAPTER_DESC1 adapter_desc;
|
||||||
adapter->GetDesc1(&adapter_desc);
|
adapter->GetDesc1(&adapter_desc);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue