Post

Replies

Boosts

Views

Activity

Comment on NSDateFormatter dealloc EXC_BAD_ACCESS
Thanks for the reply @eskimo, it is very interesting that the order matters here. I will also review the system log link you sent. I also found the ISO8601DateFormatter and if I use that, I do not have to pass any parameters, the format is fine as is. In order to combine the two answers, is the recommendation still to just declare the formatter once on class level, like: static let formatter = ISO8601DateFormatter(); instead of let formatter = ISO8601DateFormatter(); inside the log function.
Topic: App & System Services SubTopic: General Tags:
Jun ’22
Comment on NSDateFormatter dealloc EXC_BAD_ACCESS
Thank you for the suggestion, I switched to the ISO8601DateFormatter() but I guess it makes sense to make that a class variable or extension anyway as an improvement. I will continue testing to make sure my problem is solved.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’22
Comment on NSDateFormatter dealloc EXC_BAD_ACCESS
Thank you Quinn, really interesting that the order matters here. I also found the ISO8601DateFormatter() which does the job without this culprit. Thanks also for the tip on system logg, I do use it but only for the console stuff, maybe it can be improved.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’22
Comment on NSDateFormatter dealloc EXC_BAD_ACCESS
Thanks for the reply @eskimo, it is very interesting that the order matters here. I will also review the system log link you sent. I also found the ISO8601DateFormatter and if I use that, I do not have to pass any parameters, the format is fine as is. In order to combine the two answers, is the recommendation still to just declare the formatter once on class level, like: static let formatter = ISO8601DateFormatter(); instead of let formatter = ISO8601DateFormatter(); inside the log function.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’22
Comment on NSDateFormatter dealloc EXC_BAD_ACCESS
Thank you @robnotyou, I will give it a try. Have put a reminder to come back and mark as solved if I can't reproduce with this change.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’22