Timeline for Why when releasing a DirectX Texture it fail
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 27, 2016 at 20:59 | comment | added | Chuck Walbourn |
Save yourself a lot of pain and stop using raw pointers to COM interfaces. Use Microsoft::WRL::ComPtr so you don't have to worry about manual AddRef and Release counts.
|
|
Apr 20, 2016 at 20:13 | vote | accept | unknownSPY | ||
Apr 20, 2016 at 19:14 | comment | added | user1430 | Release() does not result an HRESULT! Stop casting it to one. It's just returns number, and one you cannot meaningfully rely on. It's perfectly valid for Release() to return 0, 1, 500, 128374, whatever. It simply returns to you the number of outstanding references after release, those references may not have been created by you at all. As long you are pairing every AddRef (or every create) with a Release, you're fine. If you've enabled memory leak tracking in D3D and aren't getting warnings about unreleased objects, you're fine. | |
Apr 20, 2016 at 19:09 | comment | added | unknownSPY |
Hmm, HRESULT on other Release() calls returns S_OK though. and when I comment out m_texture->Release() , I don't get a memory error when the program is closed.
|
|
Apr 20, 2016 at 18:52 | history | answered | user1430 | CC BY-SA 3.0 |