Like all COM interfaces, you must release surfaces by calling the 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 IDirectDraw2::CreateSurface or 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.