Share this post

Link to post

Share on other sites

Make sure you delete any resources in the opposite order you created them. Check the bounds that you don''t try to write more than you have allocated. Check pointers that you don''t use pointers that you have released. Always put NULL in a pointer that you don''t use. Here is an example for the render:

//in the application program loopif(myDxdevice){//do my dx stuff}

Why is this important? Because when quitting the application the program is not stopping at once. It will still run one or more times before quitting, if you then have released the myDx9device you can see what will happen. Crash galore!

Most of the time when an application hangs it is because the program is either using an invalid pointer or going beyond allocated memory. Remember that using a directx function that needs something from memory might crash because the pointer to some memory is invalid for one reason or another.

____________________________________________________________Try RealityRift at www.planetrift.comFeel free to comment, object, laugh at or agree to this. I won''t engage in flaming because of what I have said. I could be wrong or right but the ideas are mine.

Share this post

Link to post

Share on other sites

Use the Debug DX libraries, and in the control panel settings make sure the debug level is at maximum. Then, when your app closes down take a look in the output window to see if DX is reporting any memory leaks.