Numbers 0 through 12 are special, as I discovered when answering another question here . Keep in mind that this is an implementation detail, not a language specification.
In principle, the numbers before (including) 12 give you a link to an existing NSNumber, which is possible because they are immutable. The study showed that numbers 13 or more gave a separate copy.
So, you probably still ruined your memory management :-) Just because the numbers are less than 13, most likely are links to existing numbers that save your bacon in these cases. I suggest you post more code so that we can track this specific problem.
And based on your comment on another answer here:
I added a save line to the code, and now everything works fine. I do not know why. I'm just going to give it up. Thanks!
I think you will find that the fact that NSNumbers is less than 13 already has a save score of 1 before you get your own (by typing the score to 2), why they don't call EXC_BAD_ACCESS. Obviously, your code loses all the numbers that you allocate, but the system does not release those who are under the age of 13 because they are still in use (save the number of 1 or more).
source share