[solved] Debugging assertion in DeletedAtShutdown::deleteAll()

I’m debugging an iOS standalone plugin, which hits an assertion on shutdown in DeletedAtShutdown::deleteAll(), specifically on the following line:

    // if this fails, then it's likely that some new DeletedAtShutdown objects were
    // created while executing the destructors of the other ones.

    jassert (getDeletedAtShutdownObjects().isEmpty());

So I add some code to try and get the type (the DBG is useless since it only tells you what you already know, that it’s a DeletedAtShutdown object)

    for (auto& object : getDeletedAtShutdownObjects())
        DBG ("remaining deletedAtShutdown object: " << typeid(object).name());

However using the debugger I found the type of the object:

&object	juce::CoreGraphicsImageGarbageCollector *	0x161660100	0x0000000161660100

Does anyone have a clue as to what might be going on here?

Well that was a bit of a red herring… I traced it to some code added to JUCE in this commit https://github.com/WeAreROLI/JUCE/commit/b66f78bacff656fbb0dcf7f86d74567443de8081#diff-3958a2775e8d0ae9f25482d8133a9091 which has since been removed. So I updated the JUCE version for this project and now I can see some leaked objects being detected, which were probably the initial cause of the issue.