Need to handle the case where the app can't allocate the memory.