My app uses NSTimer variable which uses NSNotificationCenter.postNotificationName to post notification to UIViewController class every seconds.
The issue is the app crashes once in a while with no stacktrace which mean it is a memory issue.
From Instruments, it happens because a 1.78MB increase in VM:Allocation. The allocation just happens randomly.
Here is right after I start the timer:
Here is when I start the timer for a few minutes
So,
I don't see stacktrace or anything. How do I go about debugging this?
The app use only 7.3MB and is in the foreground, why does it get kill?? :(
- I just leave the timer running, the method only updating existing variables, what trigger this VM:Allocation???
I use Swift, if that matters
Thanks,