mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
iOS: Allow multiple instances of ScopedJuceInitialiser_GUI
Previously, the UnitTestRunner example in the DemoRunner would fail on any tests that included ScopedJuceInitialiser_GUI, as DeletedAtShutdown objects would be destroyed too early.
This commit is contained in:
parent
238a99caf8
commit
f024e7ab09
1 changed files with 2 additions and 1 deletions
|
|
@ -53,6 +53,7 @@ namespace juce
|
|||
#endif
|
||||
{
|
||||
UIBackgroundTaskIdentifier appSuspendTask;
|
||||
std::optional<ScopedJuceInitialiser_GUI> initialiser;
|
||||
}
|
||||
|
||||
@property (strong, nonatomic) UIWindow *window;
|
||||
|
|
@ -137,7 +138,7 @@ JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
|||
- (void) applicationDidFinishLaunching: (UIApplication*) application
|
||||
{
|
||||
ignoreUnused (application);
|
||||
initialiseJuce_GUI();
|
||||
initialiser.emplace();
|
||||
|
||||
if (auto* app = JUCEApplicationBase::createInstance())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue