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

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -

Why does a .NET 4.0 program produce a system.unauthorizedAccess error on a Windows Server 2012 machine with .NET 4.5 installed? -