Surface.ReleaseGraphics Method

Language:

Releases the device context obtained by calling Surface.GetGraphics.

Definition

Visual Basic Public Sub ReleaseGraphics()
C# public void ReleaseGraphics();
C++ public:
void ReleaseGraphics();
JScript public function ReleaseGraphics();

Remarks

A device context is a Microsoft Windows resource and must be released after use so the operating system can return it to the pool of available resources.

This method releases only the device context returned by Surface.GetGraphics, otherwise the method fails.

Exceptions
InvalidCallException The method call is invalid. For example, a method's parameter might contain an invalid value.

See Also


Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center