c++ - D3D leaks, but is it because I have references in global objects? -
i getting device leak reports (and non-zero ref count dialog) d3d11 debug runtime. have 2 global classes contain smart pointers layout buffer, vertex shader, , pixel shaders.
if place breakpoint on destructor of classes, can see leak reports happen before globals deleted, perhaps might expect.
what's right way correct this, while still keeping global (for now)? planning add 'cleanup' function releases manually during shutdown rather relying on smart pointers, feels bit of hack.
yeah bit annoying. traditionally document ignore these false positives. if want work around it, resetting smart pointers @ bottom of main
job.
y'know, unless other objects static storage duration rely on classes. don't, right??
Comments
Post a Comment