Patent ID: 8340652

Claim:
A method of memory management on a wireless device, the method comprising: determining a first low-memory event when available memory is below a defined threshold; deleting a first set data records stored in the memory when the first low-memory event is determined, the first set of data records incrementally deleted in order of a priority associated with each data record until the first low-memory condition is cleared or no more of the first set of data records are present; determining a second low-memory event when available memory is still below a defined threshold after deletion of the first set of data records; executing a cleanup script on the wireless device, the cleanup scripts marking a second set of data records for deletion and assigning a priority when the second low-memory event occurs; and deleting the second set data records stored in memory when the second low-memory event is determined, the second set of data records incrementally deleted based in order of priority associated with each data record until the second low-memory condition is cleared or no more of the second set of data records are present.