Closed ryanrhee closed 6 years ago
@bhs context: we're observing a small crash rate and after looking deeply into it with @ryanrhee we can't find an obvious crash point. We tried testing with 100000 operations over many threads and queues, and weren't able to repro the crash.
In almost every case the stack trace goes into NSUserDefaults intenals, and hits a zombie. One possible case is that the current autoreleasepool gets drained under us while this is executing.
We should take this code out if we don't observe a crash rate reduction in the next releases.
@bcronin FYI neither myself nor @supermarin can merge this PR.
@bcronin do you mind pushing a minor release with this change?
@keith , 3.2.11 has been pushed. Let me know if there are any issues.
Thanks!
@supermarin has a theory that the autoreleasepool might be being released underneath us while the samples are being persisted, which makes the NSData (from NSKeyedArchiver) get freed by the time we save to NSUserDefaults.
Adding an explicit autorelease pool on top may fix this.