Texture won't load and I get an unhandled exception

Started by
12 comments, last by sarim 11 years, 2 months ago

Ok so new problem now dry.png The program runs fine and the objects render. However when I close the program, there is an exception in the destructor of the Object class. I think it's because it's trying to delete something that was already deleted? Or is it something else? I think I need a way to sequentially delete everything in the game ( i.e Objects, then ObjectManager, then D3DManager ) but I'm not sure how I would do that?

Advertisement

Stack objects are destroyed in the reverse order they are created. Objects on the heap can be deleted in any order (although deleting those in reverse-order as well is generally good practice).

The D3D9 debug runtime (enabled in dxcpl.exe) can give you insight into unreleased resources.

So would dynamically creating Objects, ObjectManager, and D3DManager as pointers be a solution so that I can delete them in the right order manually when the program ends?

Nevermind, I found a solution to it I think

This topic is closed to new replies.

Advertisement