ID3D11Debug::ReportLiveDeviceObjects() and internal device references/lifetime(s)

Started by
0 comments, last by SBD 3 years, 1 month ago

In the debug build of my game, with the D3D debug layer fully enabled, the game exits cleanly (no reports of hanging D3D object references on application termination).

I also use ID3D11Debug::ReportLiveDeviceObjects() to output any externally referenced objects so as to facilitate tracking down object leaks prior to exit. At the point I call this, I have just finished releasing all rendering resources, cleared state, flushed and released the device context, and released the device (this is in my renderer termination). ReportLiveDeviceObjects() reports that the device still has two references. If I expand this to include internal references (remove D3D11_RLDO_IGNORE_INTERNAL), this shows the context has internal references, as well as a few scattered states, etc., that have internal references. Now, obviously, between the point I'm calling this and the application termination, these internal references are getting cleaned up, so there's no real issue here. But I'm interested to know how/at what point that (internal) D3D cleanup occurs (message queue pumped, etc.?), so that I can either force that cleanup to happen or potentially move my ReportLiveDeviceObjects call past that point to avoid it asserting on things that will be cleaned up at application termination. Were it not for the fact the the device itself only reports “RefCount”, and apparently has no distinction for internal/external references, this would be a non-issue.

Anyone have any details on how/when the D3D11 runtime cleans up its internal references?

This topic is closed to new replies.

Advertisement