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

Developer

Forums

Forums:

hi all:

This is for all the people who would suffer this memory leak error. application runs fine, but when you close the application, it says

"Module Failed to free all the Memory" ...

how can i find out which memory;s to release as the code base is significantly large.. ?

any idea what those numbers are in App_Cleanup and App_Free? thanks!!

it says:

#*g*C=1000003:3
ISHELL_AppStart 16818161
WakeStart...
#*gSU=16809984
#*gCL=16809984
WARNING: App Callback Pending (00E614C0)
WARNING: App Callback Pending (00E62F1C)
WARNING: App Callback Pending (00E63228)
WARNING: App Callback Pending (00E638CC)
WARNING: App Callback Pending (00E63B18)
WARNING: App Callback Pending (00E60034)
App_Cleanup(1008000)
** M-0 Released
App Context Created 16818161
#*gST=16818161
App_SendStart(0)...
SetConfig-> Data Network
App Started...
WakeStart Done...
#*gDC
err code : 0
#*gXX=Current
CloseApplet - 16818161
WakeClose 1009ff1
App_Close (1009ff1) - RESUME
#*gCL=16818161
WARNING: App Callback Pending (00E5F96C)
App_Cleanup(1009ff1)
WARNING: SysObj (00E5F68C) File: AEEDisp.c Line: 431
** NETTEST Released
Validating Heap...
------ App Heap Info ------
64 - NETTEST #195 File: OEMBitmap_generic.h Line: 110 (L)
113 - NETTEST #196 SHELL (L)
580 - NETTEST #197 GRAPHICS (L)
35444 - NETTEST #199 File: OEMBitmap_generic.h Line: 115 (L)
-------------------------
87719 Alloc - Total
0 OEM
51518 BREW
36201 Apps
1221 Wasted
111060 Free - Total
96980 Largest
12280 Largest Non Seq.
14080 Total Non Seq.
-------------------------
** NETTEST Unloading
App_Free(1009ff1)
App_Cleanup(1009ff1)
WakeResume
#*gRE=16809984
Restart App
App_SendStart(0)...
App Started...
WakeResume Done
#*gSU=16809984
#*gCL=16809984
WARNING: Timer Pending 004F9594
App_Cleanup(1008000)
** M-0 Released
#*gSU=0
App_Cleanup(0)
#*gSU=0
App_Cleanup(0)
#*gSU=0
App_Cleanup(0)

hi,
it looks like u r not releasing the shell and graphics pointer as seen in the app heap info of the output window.
ciao,
anandF

hi,
it looks like u r not releasing the shell and graphics pointer as seen in the app heap info of the output window.
ciao,
anandF

Quote:36201 Apps
1221 Wasted
111060 Free - Total
96980 Largest
Also you have not freed some where in the code.

Quote:36201 Apps
1221 Wasted
111060 Free - Total
96980 Largest
Also you have not freed some where in the code.

> {
WARNING: App Callback Pending (00E614C0)
WARNING: App Callback Pending (00E62F1C)
WARNING: App Callback Pending (00E63228)
WARNING: App Callback Pending (00E638CC)
WARNING: App Callback Pending (00E63B18)
WARNING: App Callback Pending (00E60034)
> }
Wonder if you are not cancelling the timers that have been used in your app.
DO you get same number of leaks on actual device? Sometimes, OEM_Bitmapgeneric.h error is reported on Simulator but on actual device it never used to give me that leak. What device are you using?
> any idea what those numbers are in App_Cleanup and App_Free?
Address of your apps main structure on heap. (Pl see the signatures of those functions - the pointer arguments there will have the values shown in the output).
Luckily, your app does not a lot many leaks and it is very much managable. :-) Good luck!!
-Viren

> {
WARNING: App Callback Pending (00E614C0)
WARNING: App Callback Pending (00E62F1C)
WARNING: App Callback Pending (00E63228)
WARNING: App Callback Pending (00E638CC)
WARNING: App Callback Pending (00E63B18)
WARNING: App Callback Pending (00E60034)
> }
Wonder if you are not cancelling the timers that have been used in your app.
DO you get same number of leaks on actual device? Sometimes, OEM_Bitmapgeneric.h error is reported on Simulator but on actual device it never used to give me that leak. What device are you using?
> any idea what those numbers are in App_Cleanup and App_Free?
Address of your apps main structure on heap. (Pl see the signatures of those functions - the pointer arguments there will have the values shown in the output).
Luckily, your app does not a lot many leaks and it is very much managable. :-) Good luck!!
-Viren

Considering the output of emulator you have pasted, I think it is the leak of Bit Map. This leak occurs whenever we dont free any BitMap. E.g. when we don't release the pointer after doing CONVERTBMP using SYSFREE() then this type of leak occures. Make sure that all the pointers which are allocated using CONVERTBMP are getting free ( using SYSFREE() ) .
ptr= CONVERTBMP();
if the following statement is missing for any of the pointer (ptr) then the Bit Maps leak occures.
//SYSFREE(ptr);

Considering the output of emulator you have pasted, I think it is the leak of Bit Map. This leak occurs whenever we dont free any BitMap. E.g. when we don't release the pointer after doing CONVERTBMP using SYSFREE() then this type of leak occures. Make sure that all the pointers which are allocated using CONVERTBMP are getting free ( using SYSFREE() ) .
ptr= CONVERTBMP();
if the following statement is missing for any of the pointer (ptr) then the Bit Maps leak occures.
//SYSFREE(ptr);