Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi,

 

I am getting a strange memory leak

          c:\code312\brewery\pk\src\OEMBitmap_generic.h:207(L)

 

I checked the reference count of IBitmap while releasing, it was zero. What can be the issue?

 

- Herojit

Looks like it is related to creating compatible bitmap. Is this for device or simulator? Can you please elaborate?

Looks like it is related to creating compatible bitmap. Is this for device or simulator? Can you please elaborate?

Hi,
 
Thanks for the reply. This is for simulator. Our app uses both IDIB and IBitmap for caching image and back buffer drawing. 
 
- Herojit 

Hi,
 
Thanks for the reply. This is for simulator. Our app uses both IDIB and IBitmap for caching image and back buffer drawing. 
 
- Herojit 

Got the solution. The cause was I was changing the 'pBmp' as shown below
 
nErr = IDISPLAY_CreateDIBitmap(m_piDisplay, &piDIB, 32, width, height);

//piDIB->pBmp = NULL; // This was the cause for the leak- Herojit

Got the solution. The cause was I was changing the 'pBmp' as shown below
 
nErr = IDISPLAY_CreateDIBitmap(m_piDisplay, &piDIB, 32, width, height);

//piDIB->pBmp = NULL; // This was the cause for the leak- Herojit