Windows Mobile memory leak problem

All,

I currently have a phone from a customer who has been experiencing various issues with the Windows mobile app. The problem is that the phone ends up completely resetting itself when the app starts. I have this in the house to do some testing and I haven't experienced reset, but I notice that program memory drops significantly when working through forms. We have a small memory leak from the application we are trying to narrow down, but nothing like that.

Eventually the application just falls out of the program memory, but it seems that not all memory is released. Program memory is not reverted to original memory. They installed some third party apps like VicSoft ClearTemp, but these apps seem to just delete temporary files to keep memory low. The phones in question are the Sprint 6800 Windows Mobile 6.0. The application is written in the .NET 2.0 Compact Framework.

We have an issue where the application is throwing a still actual issue from memory and it seems to be happening randomly. This problem seems to be directly related to memory, but perhaps they work hand in hand causing a crash.

Any ideas or help would be greatly appreciated.

  • Steve
+2


source to share


5 answers


Make sure you dispose of your forms after you're done with them (calling Dispose () or declaring and using them in a using () block), especially if they contain bitmaps and / or PictureBoxes. More generally, make sure you delete every recyclable resource.



+3


source


The application ending effect is probably caused by 1 of 2 things:

As already pointed out, make sure you call Dispose on all GDI related objects (bitmaps, handles, etc.). Descriptions of the error related to bitmaps can be found here and here .



Another thing to keep in mind is that the Components on the form are not selected when the form itself (as opposed to controls), so if you are doing a lot of create and destroy forms, pay close attention to this.

If you can upgrade a project to target 3.5, even if it is for internal testing only, running CF 3.5 CLR Profiler can certainly help you find the leak.

+3


source


If you constantly create and destroy ENSURE objects, your event handlers are unhooked, otherwise the garbage collector will think that these objects are still in use, which results in what looks like a memory leak.

0


source


An excellent solution for Windows Mobile Memory Leak is cleanRAM (RAM Cleaner).

For more information and download the latest pureRAM:

www.htcaddicts.com/?id=110

0


source


if its a memory leak, then the result program grabs more and more memory until it finally crashes due to lack of memory. This means that heap is created or allocated, but forgets that the memory was not released. If a memory leak occurs, then the memory is not available for the given program. for this particular solution, you can see this as well .

0


source







All Articles