Sign in to follow this  
Sparhawk42

DXUT and Alt+F4

Recommended Posts

I've there a question. I have a small Direct3D9 application, which runs in full screen and has the following elements: - some ID3DXFont - CDXUTDialog - ID3DXSprite - CDXUTTextHelper - IDirect3DSurface9 My problem is, when ending the programm with Alt+F4, I get the following message: "The D3D device has a non-zero reference count, meaning some objects were not released" I know, this means I've to release some further Direct3D9-Elements, but I don't know which. Especially as I don't get this message, when using Alt-Tab or exit(0). So what is different between Alt+F4 and exit(0) according to the call of destructors, as I release nearly all objects in destructors of my own classes?

Share this post


Link to post
Share on other sites
Hi,

I think you will get a WM_QUIT message when alt+F4 is pressed, but people, please correct me if I'm wrong.

The other part:
If you dunno what remains allocated, then use the Debug runtime, check everything, set loglevel to max, and watch the output window when quitting!
(Also, there are cases when you lock something more then once, and release it only once, chech the return value of Release() then)

kp

Share this post


Link to post
Share on other sites
Thanks for the fast answer.

O.K. how can I activate the debug runtime and increase the loglevel?

Where I'am lost is that Alt-Tab works correct, but that alt-F4 produces those errormessage...

Which DXUT-Callbacks are called, when I press Alt+F4 as User?

Share this post


Link to post
Share on other sites
Go to Control panel, there you find a DirectX icon, and from the Direct3D pane, you will find everything I have mentioned.

kp


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this