Releasing Surfaces (Windows Embedded CE 6.0)

1/6/2010

Like all COM interfaces, you must release surfaces by calling their IDirectDrawSurface::ReleaseDC 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 IDirectDraw::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 does not affect the reference count of the other surfaces in the chain, and does not release any of the surfaces in the chain.

See Also

Concepts

COM Reference Count Semantics for Surfaces