HSBC interview question

How to fix an OutOfMemoryError