Motorola Solutions interview question

How do you handle memory leaks and out of memory errors on Android?