Why do we get memory errors such as "memheap.c 0696" when using IDISPLAY_BitBlt() to draw a bitmap image?
Submitted by: AdministratorEnsure that you are freeing the memory allocated by CONVERTBMP. Check the last Boolean parameter of CONVERTBMP. If True, a reallocation was done and the memory must be freed using SYSFREE.
For example:
pBmp = CONVERTBMP (pDataBytes, &imageInfo, &bVal);
IDISPLAY_BitBlt (pIDisplay, xDest, yDest, cxDest,
cyDest, pBmp, xSrc, ySrc, dwRopCode);
IDISPLAY_Update (pIDisplay);
if(bVal) //free only if realloc was done
SYSFREE (pBmp);
Submitted by: Administrator
For example:
pBmp = CONVERTBMP (pDataBytes, &imageInfo, &bVal);
IDISPLAY_BitBlt (pIDisplay, xDest, yDest, cxDest,
cyDest, pBmp, xSrc, ySrc, dwRopCode);
IDISPLAY_Update (pIDisplay);
if(bVal) //free only if realloc was done
SYSFREE (pBmp);
Submitted by: Administrator
Read Online Brew Job Interview Questions And Answers
Top Brew Questions
☺ | How to handle the case when we lose cellular coverage? |
☺ | What precautions should we take when I invoke INETMGR_GetHostByName() to perform DNS lookup? |
☺ | When reading from a socket the phone reads whatever it can in one go, while the emulator reads large packets in chunks. Why? |
☺ | Does BREW support blocking sockets? |
☺ | Why does ISHELL_CreateInstance return ECLASSNOTSUPPORT when I try and create an instance of the net manager (AEECLSID_Net)? |
Top Mobile OS Categories
☺ | iOS Interview Questions. |
☺ | Asha OS Interview Questions. |
☺ | Windows Phone (WP) Interview Questions. |
☺ | iOS Developer Interview Questions. |
☺ | BlackBerry Tablet OS Interview Questions. |