If by memory, you mean RAM, then its obvious it would happen. By default, on Windows Mobile, the apps are not closed when you click on X to close them. They are just minimized and stay in RAM. Use some software to change this default behavior to close apps when you click on X.