Daily iOS
Memory and ARCMicrosoft

autorelease buildup in loops

A for loop that runs fine on up to 5,000 records crashes after a memory warning above that. Inside the loop you slice and concatenate strings and repeatedly convert with String(format:) and NSData. The hint is 'autorelease'. Explain the cause.

Submit