内存泄露了,有什么没释放吗
HINSTANCE hInstance = (HINSTANCE)GetWindowLong(paintvariable.hWnd,GWL_HINSTANCE);HBITMAP hBitmap = LoadBitmap(hInstance,MAKEINTRESOURCE(paintvariable.ID) );
HDC hDC = GetDC(paintvariable.hWnd);
HDC hDCmem = CreateCompatibleDC(hDC);
SelectObject(hDCmem,hBitmap);
BITMAP bmp;
GetObject(hBitmap,sizeof(BITMAP),(LPVOID)&bmp);
for(int i = 0; i < 4; i++)
{
BitBlt(hDC,
paintvariable.x + block[specifickind].x[i] * BLOCKLENGTH, paintvariable.y + block[specifickind].y[i] * BLOCKLENGTH,
bmp.bmWidth, bmp.bmHeight, hDCmem, 0, 0, SRCCOPY);
}
ReleaseDC(paintvariable.hWnd, hDCmem);
ReleaseDC(paintvariable.hWnd, hDC);
DeleteObject(hBitmap);
这是自定义的在一点处输出一张位图的函数,这个函数中有什么没释放吗,在循环输出时,我打开任务管理器,发现内存消耗不断增大