Java ME memory management
This is to describe garbage collection and memory management in general.
Garbage collection is a service which clears the objects which are eligible for deletion.Like in C/C++ developer is not able to directly access the memory and clear the objects. In Java this job is taken by Garbage collector which handles this function.
Garbage collection service is called by System.gc() but this does not guarantee that JVM will activate garbage collector. Its up to JVM to decide to whether to run it or not. The objects which are eligible for garbage collection are which don't have any reference to it.