Destroying Objects Associated with a Direct3D Context

This topic applies to DirectX 7.0 and later.

To prevent memory leaks, a display driver must release all objects associated with a Direct3D context when the driver's D3dContextDestroy function is called. These objects include, for example, vertex and pixel shaders, declarations and code for vertex shaders, resources for asynchronous queries, and texture resources.