Intel G41 Chipset Direct3D Process handle leak (sample code included)
Intel G41 Express Chipset
Driver Date: 09/21/2010
Driver Version: 6.14.5303
OS: Windows XP Pro 32bit
I have an application that is used for videosurveillancethat is experiencing large memory leaks when using this chipset. I thought maybe it would be resolved by updating to the latest driver version (as of yesterday) which I listed above and that didn't seem to help. In fact, if anything I think it's now leaking more. What happens is that every time we call Direct3DCreate9() it will create 85 process handles and every time we call CreateDevice() to create our Direct3D device it will create an additional 171 process handles.
I've tried experimenting with different things. If I call Direct3DCreate9() and immediately release it then it will still leak the 85 handles. Similarly if I simply release the Direct3D device immediately after calling CreateDevice() without doing anything all those handles leak as well.
If I simply don't release either and leave re-use them for the duration of the application then no further process handles will be created. This part is a small improvement over my previously reported issue with the Intel 945 chipset drivers:
I'm reusing the same sample code from that issue to duplicate this here as well. I'm also using the SysInternals program handle in order to monitor the handles created by my application and determine what type of handles they are.
For convenience here is the sample code to reproduce the issue:
void PerformDirect3DTest(HWND hWnd)
HRESULT hr = S_OK;
CComPtr d3d = NULL;
CComPtr d3d_device = NULL;
// see what we can do with the graphics hardware before we try to do anything