Home > Articles > Programming > User Interface (UI)

  • Print
  • + Share This
This chapter is from the book

Memory Management and Closing Applications

If you have any experience with the first release of the Pocket PC operating system, you no doubt recall the confusion surrounding the closing of applications. Unlike desktop operating systems, in which you must manually shut down applications to unload them from memory, the Pocket PC operating system enabled you to leave applications running. The idea was that the operating system itself is vigilant enough at managing memory that it will automatically unload lesser-used applications as it sees fit. In fact, there was no X (Close button) in the upper-right corner of applications in the original Pocket PC operating system, which meant there was no intuitive way to shut down applications manually. Although this concept seemed like a good idea, it gave users fits because they felt powerless to close applications. Additionally, the memory management wasn't as good as Microsoft had hoped, and the operating system ended up not doing such a great job of keeping things running smoothly.

Pocket PC 2002 solved the closing application problem in two ways: with a revamped memory manager and a Close button. The new memory manager in Pocket PC 2002 does a much better job of targeting "stale" applications and removing them from memory, which is the most important fix to the problem of applications hogging memory. The new Close button isn't quite as significant of a fix because it doesn't really function as a Close button. The X in the upper-right corner of applications is there in Pocket PC 2002, and even though I'm referring to it as a Close button, it actually functions as a Minimize button. When you click the X to close an application, you're really minimizing the application and sending it to the bottom of the application pile. The application is still in memory, but you've relegated it to being the first to go if the memory manager decides to clean house.

The functionality of the Close button is definitely misleading because an X button in any desktop version of Windows has always meant "close," not "minimize." On the other hand, Pocket PCs don't really have a notion of minimized applications, at least in terms of seeing their icons along the bottom of the screen. So, the distinction between an application being closed or minimized really comes down to an issue of memory and performance. For efficiency reasons, Microsoft opted to minimize applications in response to users clicking the X, as opposed to actually closing them. If you return to a recently "closed" application, it will still be in memory, and therefore you won't experience a delay for it to reload. Of course, this relies on the Pocket PC memory manager to do a good job of unloading applications whenever necessary, which fortunately it does.

If your device is acting a little strange and you feel it could benefit from a clean start, see "Restarting Your Device" in the "Troubleshooting" section at the end of the chapter to learn how to restart your device.

The good news about this entire discussion is that the whole close/minimize application issue is pretty much transparent to you as a user. As far as you're concerned, when you click the Close button, the application disappears from the screen and therefore appears to be closed. If you're the obsessive type who simply must have complete control over a situation, you can always look to the Memory section of the system Settings screen to see exactly which applications are loaded in memory. The following steps show you how to find out which applications are currently running:

  1. Tap Start, and then tap Settings.

  2. Tap the System tab, and then tap the Memory icon.

  3. Tap the Running Programs tab to view the Running Program List.

Figure 3.13 shows the Running Program List, which in this case consists of five applications.

Figure 3.13 The Running Program List displays the applications that are currently loaded and running in memory.

The buttons just below the Running Program List enable you to activate an application, stop (close) an application, or stop all applications. This is a good way to manually exercise some control over the memory management of applications, although you might not need to use it very often.

TIP

If you want to close an application without having to rely on the Running Program list, tap the Ctl key (Control) on the soft keyboard, followed by the q key. This is the equivalent of issuing a Ctrl+Q command on a normal keyboard, which closes an application.

CAUTION

On the main Settings screen is a Remove Programs icon. Although your first impression might be that this removes a program from memory, it actually removes (uninstalls) the selected application from your device. Use this option only if you want to completely remove an application from your device, not just close it.

  • + Share This
  • 🔖 Save To Your Account