I have the following code. However, I found that after the deletion of bitmap, memory is still not freed...anything I've done wrong?
1. in a bitmap creation function:
iBitmap = new (ELeave) CFbsBitmap();
where iBitmap is an instance of CFbsBitmap.
2. in a callback function:
where iFileToBmp is an instance of CMdaImageFileToBitmapUtility.
3. in the deleting function:
iBitmap = NULL;
I've checked the memory used before & after step 3. and found the available memory has not changed!!
(in fact, the program can exit without error by using the above code, but it seems that the bitmap's data is still in memory after the deleting function 3.)
Please help...really confused about that...thx a lot!
Not much use, but I am having similar problems. I'm manipulating lots of small images that are being deleted and recreated as time goes by. Whilst logging shows that all bitmaps that are created and destroyed (in the same was as horaceng has done), eventually the scaling operations return with a KErrNoMemory (-4) error.
But I dont use that much memory at any one time. It seems maybe the FBS Server needs to flush it's shared buffer or something.
Whilst this isn't a solution to your problem horaceng, I'm hoping this additional post will draw more attention to it. If I find a solution, I'll put it on here.