Search code examples
c++direct3d9

Memory management of hDCs


I've got an ID3DXFont (which is Direct3D9, by the way) which offers a method GetDC() which returns a handle to a device context (hDC). How is the memory for this value managed? MSDN doesn't mention anything about it and it doesn't provide it's own memory management like COM interfaces do.


Solution

  • You need to release that handle with ReleaseDC(HDC).