문제

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.

도움이 되었습니까?

해결책

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

다른 팁

Can't you use SAFE_RELEASE macro on the handle?

I believe you have to call DeleteDC on the handle returned, when you are done with it. It was difficult to find much reference to this, with the exception of a comment made in this thread on gamedev.net.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top