Why is TimerThread no longer DeletedAtShutdown?

I am aware this was done in this commit Timer: Replace DeletedAtShutdown with SharedResourcePointer · juce-framework/JUCE@47be26d · GitHub

and also that there have been some follow-up commits to fix issues that the commit above introduced.

Now I’m updating a plug-in from a JUCE version prior to that commit, to a more recent one (the latest commit in the JUCE 7 branch) where all those commits regarding Timer are present.

I have a Timer in a singleton that has static storage, and that is causing me problems after the update. I am not surprised, I have read several topics about that and I am working on it.

But my question here is: what problem was being solved in the original commit, by changing TimerThread from being a DeletedAtShutdown to being managed by a SharedResourcePointer?

I’m asking because, while I fix the issues I’m experiencing after the update, I want to avoid inadvertently falling in the same problem that was being solved with that change to begin with

It’s a difficult one because the issue seems to be one that no developer has been able to reproduce or catch under a debugger but some end-customers have reported crashes in Logic Pro relating to the TimerThread. There are several variations of this crash that we’ve seen via crash logs. Some of those crash logs show the timer was being accessed after deletion so we were trying to improve the lifetime safety guarantees by using a SharedResourcePointer instead.