A garbage collection method is provided. The method comprises setting at
least a garbage collection condition for the mobile terminal; converting
a state of the mobile terminal from a first state to a second state when
the at least one garbage collection condition is met; and starting a
garbage collection procedure while the mobile terminal is in the first
state, wherein in the first state the garbage collection procedure is not
interrupted by an external event.