Platform SDK: DirectX |
Like all COM interfaces, you must release surfaces by calling their IDirectDrawSurface7::Release method when you no longer need them.
Each surface you individually create must be explicitly released. However, if you implicitly created multiple surfaces with a single call to IDirectDraw7::CreateSurface, such as a flipping chain, you need only release the front buffer. In this case, any pointers you might have to back buffer surfaces are implicitly released and can no longer be used.
Explicitly releasing a back buffer surface doesn't affect the reference count of the other surfaces in the chain.
You must release surfaces by setting the surface to Nothing when you no longer need them.
Each surface you individually create must be explicitly released. However, if you implicitly created multiple surfaces with a single call to DirectDraw7.CreateSurface, such as a flipping chain, you need only release the front buffer. In this case, any back buffer surfaces are implicitly released and can no longer be used.