Resizing the result array is required.