![]() |
![]() |
![]() |
Surface.ReleaseGraphics Method |
Language: |
Releases the device context obtained by calling Surface.GetGraphics.
Visual Basic .NET Public Sub ReleaseGraphics() C# public void ReleaseGraphics(); Managed C++ public: void ReleaseGraphics(); JScript .NET public function ReleaseGraphics();
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.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center